Divorce the runtime from FeeCalculator (#20737)

This commit is contained in:
Jack May
2021-10-22 14:32:40 -07:00
committed by GitHub
parent 613c7b8444
commit bfbbc53dac
24 changed files with 503 additions and 563 deletions

View File

@ -636,6 +636,7 @@ impl TestValidator {
/// Return an RpcClient for the validator. As a convenience, also return a recent blockhash and
/// associated fee calculator
#[deprecated(since = "1.9.0", note = "Please use `get_rpc_client` instead")]
pub fn rpc_client(&self) -> (RpcClient, Hash, FeeCalculator) {
let rpc_client =
RpcClient::new_with_commitment(self.rpc_url.clone(), CommitmentConfig::processed());
@ -647,6 +648,11 @@ impl TestValidator {
(rpc_client, recent_blockhash, fee_calculator)
}
/// Return an RpcClient for the validator.
pub fn get_rpc_client(&self) -> RpcClient {
RpcClient::new_with_commitment(self.rpc_url.clone(), CommitmentConfig::processed())
}
pub fn join(mut self) {
if let Some(validator) = self.validator.take() {
validator.join();