From ebbb106fb79c6bdbeef4c9fd41b54ee7c60134f2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 5 Sep 2020 00:42:16 +0000 Subject: [PATCH] Add unlock epochs for blake3 (bp #12054) (#12055) * Add unlock epochs for blake3 (#12054) Co-authored-by: Carl (cherry picked from commit a13efc52b3a973bdc07602e684e3fe772716a275) # Conflicts: # runtime/src/accounts_db.rs * Resolve conflicts * Bump hash Co-authored-by: carllin Co-authored-by: Carl --- runtime/src/accounts_db.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index b9ced042b0..bef45f8632 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -1426,9 +1426,12 @@ impl AccountsDB { fn get_blake3_slot(operating_mode: OperatingMode) -> Slot { match operating_mode { - OperatingMode::Development => std::u64::MAX, - OperatingMode::Stable => std::u64::MAX, - OperatingMode::Preview => std::u64::MAX, + // Epoch 400 + OperatingMode::Development => 3_276_800, + // Epoch 78 + OperatingMode::Stable => 33_696_000, + // Epoch 95 + OperatingMode::Preview => 35_516_256, } } @@ -3613,7 +3616,7 @@ pub mod tests { }; let account = stored_account.clone_account(); let expected_account_hash = - Hash::from_str("GGTsxvxwnMsNfN6yYbBVQaRgvbVLfxeWnGXNyB8iXDyE").unwrap(); + Hash::from_str("DoLjP4cYoGFKn4unuxeSjwDkN3bZop8jpGWYfAnwnG5N").unwrap(); assert_eq!( AccountsDB::hash_stored_account( @@ -3638,7 +3641,7 @@ pub mod tests { ); let expected_account_hash_with_owner = - Hash::from_str("5iRNZVcAnq9JLYjSF2ibFhGEeq48r9Eq9HXxwm3BxywN").unwrap(); + Hash::from_str("4StuvYHFd7xuShVXB94uHHvpqGMCaacdZnYB74QQkPA1").unwrap(); assert_eq!( AccountsDB::hash_stored_account(