Fix fee mismatch on snapshot deserialize (#12697)

Co-authored-by: Carl Lin <carl@solana.com>
This commit is contained in:
carllin
2020-10-08 23:44:41 -07:00
committed by GitHub
parent 81489ccb76
commit c879e7c1ad
9 changed files with 57 additions and 57 deletions

View File

@ -68,7 +68,7 @@ pub struct FeeRateGovernor {
// The current cost of a signature This amount may increase/decrease over time based on
// cluster processing load.
#[serde(skip)]
lamports_per_signature: u64,
pub lamports_per_signature: u64,
// The target cost of a signature when the cluster is operating around target_signatures_per_slot
// signatures

View File

@ -4,7 +4,7 @@
use byteorder::{ByteOrder, LittleEndian};
use solana_sdk::clock::Slot;
#[derive(Default, Clone, Deserialize, Serialize, AbiExample)]
#[derive(Default, Clone, Debug, Deserialize, Serialize, AbiExample, PartialEq, Eq)]
pub struct HardForks {
hard_forks: Vec<(Slot, usize)>,
}

View File

@ -8,7 +8,7 @@ use std::ops::Deref;
pub const MAX_ENTRIES: usize = 512; // it should never take as many as 512 epochs to warm up or cool down
#[derive(Debug, Serialize, Deserialize, PartialEq, Default, Clone, AbiExample)]
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Default, Clone, AbiExample)]
pub struct StakeHistoryEntry {
pub effective: u64, // effective stake at this epoch
pub activating: u64, // sum of portion of stakes not fully warmed up
@ -16,7 +16,7 @@ pub struct StakeHistoryEntry {
}
#[repr(C)]
#[derive(Debug, Serialize, Deserialize, PartialEq, Default, Clone, AbiExample)]
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Default, Clone, AbiExample)]
pub struct StakeHistory(Vec<(Epoch, StakeHistoryEntry)>);
impl StakeHistory {