Fix issues with bench-tps (#4005)

This commit is contained in:
Sagar Dhawan
2019-04-27 08:39:29 -07:00
committed by GitHub
parent 4a5837a286
commit 18e398131d
5 changed files with 45 additions and 16 deletions

View File

@ -166,6 +166,18 @@ impl SyncClient for BankClient {
}
Ok(())
}
fn get_new_blockhash(&self, blockhash: &Hash) -> Result<Hash> {
let last_blockhash = self.bank.last_blockhash();
if last_blockhash != *blockhash {
Ok(last_blockhash)
} else {
Err(TransportError::IoError(io::Error::new(
io::ErrorKind::Other,
"Unable to get new blockhash",
)))
}
}
}
impl BankClient {