Fix a couple replicator nits (#4345)

automerge
This commit is contained in:
Michael Vines 2019-05-20 08:55:45 -07:00 committed by Grimes
parent 44ff25d044
commit 034eda4546
2 changed files with 5 additions and 8 deletions

View File

@ -137,7 +137,7 @@ fn create_request_processor(
let t_responder = responder("replicator-responder", storage_socket.clone(), r_responder);
thread_handles.push(t_responder);
let exit4 = exit.clone();
let exit = exit.clone();
let t_processor = spawn(move || loop {
let packets = r_reader.recv_timeout(Duration::from_secs(1));
if let Ok(packets) = packets {
@ -156,12 +156,11 @@ fn create_request_processor(
}
}
}
if exit4.load(Ordering::Relaxed) {
if exit.load(Ordering::Relaxed) {
break;
}
});
thread_handles.push(t_processor);
thread_handles
}
@ -425,13 +424,12 @@ impl Replicator {
let bal = client.poll_get_balance(&storage_keypair.pubkey());
if bal.is_err() || bal.unwrap() == 0 {
let (blockhash, _fee_calculator) = client.get_recent_blockhash().expect("blockhash");
//TODO the account space needs to be well defined somewhere
let tx = system_transaction::create_account(
keypair,
&storage_keypair.pubkey(),
blockhash,
1,
1024 * 4,
1024 * 4, // TODO the account space needs to be well defined somewhere
&solana_storage_api::id(),
0,
);

View File

@ -245,12 +245,11 @@ impl StorageStage {
.get_account(&storage_keypair.pubkey())
.is_none()
{
// TODO the account space needs to be well defined somewhere
let create_instruction = system_instruction::create_account(
&keypair.pubkey(),
&storage_keypair.pubkey(),
1000,
1024 * 4,
1,
1024 * 4, // TODO the account space needs to be well defined somewhere
&solana_storage_api::id(),
);
instructions.push(create_instruction);