Split signature throughput tracking out of FeeCalculator
(#8447)
* SDK: Split new `FeeRateGovernor` out of `FeeCalculator` Leaving `FeeCalculator` to *only* calculate transaction fees * Replace `FeeCalculator` with `FeeRateGovernor` as appropriate * Expose recent `FeeRateGovernor` to clients * Move `burn()` back into `FeeCalculator` Appease BPF tests * Revert "Move `burn()` back into `FeeCalculator`" This reverts commit f3035624307196722b62ff8b74c12cfcc13b1941. * Adjust BPF `Fee` sysvar test to reflect removal of `burn()` from `FeeCalculator` * Make `FeeRateGovernor`'s `lamports_per_signature` private * rebase artifacts * fmt * Drop 'Recent' * Drop _with_commitment variant * Use a more portable integer for `target_signatures_per_slot` * Add docs for `getReeRateCalculator` JSON RPC method * Don't return `lamports_per_signature` in `getFeeRateGovernor` JSONRPC reply
This commit is contained in:
@@ -853,7 +853,7 @@ mod tests {
|
||||
instructions,
|
||||
);
|
||||
|
||||
let fee_calculator = FeeCalculator::new(10, 0);
|
||||
let fee_calculator = FeeCalculator::new(10);
|
||||
assert_eq!(fee_calculator.calculate_fee(tx.message()), 10);
|
||||
|
||||
let loaded_accounts =
|
||||
@@ -918,7 +918,7 @@ mod tests {
|
||||
let min_balance = rent_collector
|
||||
.rent
|
||||
.minimum_balance(nonce_state::NonceState::size());
|
||||
let fee_calculator = FeeCalculator::new(min_balance, 0);
|
||||
let fee_calculator = FeeCalculator::new(min_balance);
|
||||
let nonce = Keypair::new();
|
||||
let mut accounts = vec![(
|
||||
nonce.pubkey(),
|
||||
|
Reference in New Issue
Block a user