Extend GetBlockHash RPC API to include the fee scehdule for using the returned blockhash (#4222)
This commit is contained in:
@@ -39,11 +39,12 @@ pub fn spend_and_verify_all_nodes(
|
||||
.poll_get_balance(&funding_keypair.pubkey())
|
||||
.expect("balance in source");
|
||||
assert!(bal > 0);
|
||||
let (blockhash, _fee_calculator) = client.get_recent_blockhash().unwrap();
|
||||
let mut transaction = system_transaction::transfer(
|
||||
&funding_keypair,
|
||||
&random_keypair.pubkey(),
|
||||
1,
|
||||
client.get_recent_blockhash().unwrap(),
|
||||
blockhash,
|
||||
0,
|
||||
);
|
||||
let confs = VOTE_THRESHOLD_DEPTH + 1;
|
||||
@@ -65,11 +66,12 @@ pub fn send_many_transactions(node: &ContactInfo, funding_keypair: &Keypair, num
|
||||
.poll_get_balance(&funding_keypair.pubkey())
|
||||
.expect("balance in source");
|
||||
assert!(bal > 0);
|
||||
let (blockhash, _fee_calculator) = client.get_recent_blockhash().unwrap();
|
||||
let mut transaction = system_transaction::transfer(
|
||||
&funding_keypair,
|
||||
&random_keypair.pubkey(),
|
||||
1,
|
||||
client.get_recent_blockhash().unwrap(),
|
||||
blockhash,
|
||||
0,
|
||||
);
|
||||
client
|
||||
@@ -187,11 +189,12 @@ pub fn kill_entry_and_spend_and_verify_rest(
|
||||
}
|
||||
|
||||
let random_keypair = Keypair::new();
|
||||
let (blockhash, _fee_calculator) = client.get_recent_blockhash().unwrap();
|
||||
let mut transaction = system_transaction::transfer(
|
||||
&funding_keypair,
|
||||
&random_keypair.pubkey(),
|
||||
1,
|
||||
client.get_recent_blockhash().unwrap(),
|
||||
blockhash,
|
||||
0,
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user