Skip to content

Commit

Permalink
Fix some missed Sapling to Canopy checkpoint code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Mar 15, 2021
1 parent 9e23a51 commit 0a1c412
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion zebra-chain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
6 changes: 3 additions & 3 deletions zebra-consensus/src/checkpoint/list/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);

Expand Down

0 comments on commit 0a1c412

Please sign in to comment.