Move generic rpc_client functions from wallet/ to client/

This commit is contained in:
Michael Vines
2019-03-16 17:17:44 -07:00
parent 3ad019a176
commit c498775a3d
10 changed files with 363 additions and 423 deletions

View File

@@ -197,7 +197,7 @@ impl LocalCluster {
lamports: u64,
) -> u64 {
trace!("getting leader blockhash");
let blockhash = client.get_recent_blockhash();
let blockhash = client.get_recent_blockhash().unwrap();
let mut tx =
SystemTransaction::new_account(&source_keypair, dest_pubkey, lamports, blockhash, 0);
info!(
@@ -228,7 +228,7 @@ impl LocalCluster {
let mut transaction = VoteTransaction::new_account(
from_account,
&vote_account_pubkey,
client.get_recent_blockhash(),
client.get_recent_blockhash().unwrap(),
amount,
1,
);
@@ -243,7 +243,7 @@ impl LocalCluster {
// 2) Set delegate for new vote account
let mut transaction = VoteTransaction::delegate_vote_account(
vote_account,
client.get_recent_blockhash(),
client.get_recent_blockhash().unwrap(),
&delegate_id,
0,
);