Use a better name for new api

This commit is contained in:
Sagar Dhawan 2019-04-12 14:38:30 -07:00 committed by Grimes
parent 1db80d79fc
commit 1e8f83a74a
2 changed files with 5 additions and 5 deletions

View File

@ -74,7 +74,7 @@ impl JsonRpcRequestProcessor {
}
fn get_recent_blockhash(&self) -> String {
let id = self.bank().get_confirmed_blockhash();
let id = self.bank().confirmed_last_blockhash();
bs58::encode(id).into_string()
}
@ -329,7 +329,7 @@ impl RpcSol for RpcSolImpl {
.read()
.unwrap()
.bank()
.get_confirmed_blockhash();
.confirmed_last_blockhash();
let transaction = request_airdrop_transaction(&drone_addr, &pubkey, lamports, blockhash)
.map_err(|err| {
info!("request_airdrop_transaction failed: {:?}", err);
@ -450,7 +450,7 @@ mod tests {
let bank = bank_forks.read().unwrap().working_bank();
let exit = Arc::new(AtomicBool::new(false));
let blockhash = bank.get_confirmed_blockhash();
let blockhash = bank.confirmed_last_blockhash();
let tx = system_transaction::transfer(&alice, pubkey, 20, blockhash, 0);
bank.process_transaction(&tx).expect("process transaction");
@ -493,7 +493,7 @@ mod tests {
&exit,
);
thread::spawn(move || {
let blockhash = bank.get_confirmed_blockhash();
let blockhash = bank.confirmed_last_blockhash();
let tx = system_transaction::transfer(&alice, &bob_pubkey, 20, blockhash, 0);
bank.process_transaction(&tx).expect("process transaction");
})

View File

@ -383,7 +383,7 @@ impl Bank {
self.blockhash_queue.read().unwrap().last_hash()
}
/// Return the root bank's blockhash
pub fn get_confirmed_blockhash(&self) -> Hash {
pub fn confirmed_last_blockhash(&self) -> Hash {
if let Some(bank) = self.parents().last() {
bank.last_blockhash()
} else {