Improve Rpc inflation tooling (#10309)

automerge
This commit is contained in:
Tyera Eulberg
2020-05-29 12:50:25 -06:00
committed by GitHub
parent 75924bd232
commit b563b49ed5
11 changed files with 217 additions and 58 deletions

View File

@ -1917,7 +1917,7 @@ impl Bank {
self.get_slots_in_epoch(self.first_normal_epoch())
}
fn operating_mode(&self) -> OperatingMode {
pub fn operating_mode(&self) -> OperatingMode {
// unwrap is safe; self.operating_mode is ensured to be Some() always...
// we only using Option here for ABI compatibility...
self.operating_mode.unwrap()
@ -6891,25 +6891,25 @@ mod tests {
if bank.slot == 0 {
assert_eq!(
bank.hash().to_string(),
"7MKHH6P7J5aQNN29Cr6aZQbEpQcXe8KTgchd4Suk9NCG"
"DX3Jk7ae6VdogRb73iC1zdyrYN5UzinLcSFES2FQx8dY"
);
}
if bank.slot == 32 {
assert_eq!(
bank.hash().to_string(),
"3AxuV6GGcoqRi6pksN6btNEmeJCTesLbjgA88QZt9a8Q"
"FqLpq1gmTdzEmdEPa2JttEFDqRtuKwkKFKuLuqNSiYwH"
);
}
if bank.slot == 64 {
assert_eq!(
bank.hash().to_string(),
"B32ZLAzeCW5FueeauiGYnujh8Efmxvpeac74W9JU68oB"
"rBbDCyHuCBWQrLY37zjj2zwsEnzNERWHwoH3W2NpRYe"
);
}
if bank.slot == 128 {
assert_eq!(
bank.hash().to_string(),
"A2tCz2EqryRZ7tHpw9H2918RZLCbqnSGzRWUqbnnESGz"
"E9DThiAPbheGeLWBDsts8uzuwF3bJQzDWh5uo8ovtYiy"
);
break;
}