Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit c17679b

Browse files
committed
Fix fee mismatch on snapshot deserialize
1 parent 5eaf65a commit c17679b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

runtime/src/bank.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,11 @@ impl Bank {
878878
);
879879
assert_eq!(bank.epoch_schedule, genesis_config.epoch_schedule);
880880
assert_eq!(bank.epoch, bank.epoch_schedule.get_epoch(bank.slot));
881-
881+
bank.fee_rate_governor.lamports_per_signature = bank.fee_calculator.lamports_per_signature;
882+
assert_eq!(
883+
bank.fee_rate_governor.create_fee_calculator(),
884+
bank.fee_calculator
885+
);
882886
bank
883887
}
884888

sdk/src/fee_calculator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub struct FeeRateGovernor {
6868
// The current cost of a signature This amount may increase/decrease over time based on
6969
// cluster processing load.
7070
#[serde(skip)]
71-
lamports_per_signature: u64,
71+
pub lamports_per_signature: u64,
7272

7373
// The target cost of a signature when the cluster is operating around target_signatures_per_slot
7474
// signatures

0 commit comments

Comments
 (0)