Fix some missed Sapling to Canopy checkpoint code changes

This commit is contained in:
teor 2021-03-15 10:40:32 +10:00
parent 9da220517b
commit d19585cfca
2 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ impl LedgerState {
impl Default for LedgerState {
fn default() -> Self {
let network = parameters::Network::Mainnet;
let tip_height = parameters::NetworkUpgrade::Sapling
let tip_height = parameters::NetworkUpgrade::Canopy
.activation_height(network)
.unwrap();

View File

@ -250,18 +250,18 @@ fn checkpoint_list_hard_coded_canopy_testnet() -> Result<(), BoxError> {
checkpoint_list_hard_coded_canopy(Testnet)
}
/// Check that the hard-coded lists cover the Sapling network upgrade
/// Check that the hard-coded lists cover the Canopy network upgrade
fn checkpoint_list_hard_coded_canopy(network: Network) -> Result<(), BoxError> {
zebra_test::init();
let sapling_activation = Canopy
let canopy_activation = Canopy
.activation_height(network)
.expect("Unexpected network upgrade info: Canopy must have an activation height");
let list = CheckpointList::new(network);
assert!(
list.max_height() >= sapling_activation,
list.max_height() >= canopy_activation,
"Pre-Canopy blocks must be verified by checkpoints"
);