From 1757cb85a12c36350e754c26577c830dd419dca8 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sat, 19 Sep 2020 23:52:46 +0900 Subject: [PATCH] Update comment --- 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 fe4dcf0708..70f89157fe 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -1340,13 +1340,16 @@ impl AccountsDB { } pub fn include_owner_in_hash(slot: Slot, operating_mode: OperatingMode) -> bool { - // Account hashing will be updated to include owner at this slot on the devnet. - // For testnet, it fully transitioned already thanks to eager rent collection, - // so, this check is irrelevant, strictly speaking. + // When ClusterType::Devnet (= OperatingMode::Development here) was moved to + // stable release channel, it was done without hashing account.owner. + // That's because devnet's slot was lower than 5_800_000 and the release + // channel's gating lacked ClusterType at the time... + // + // For testnet and mainnet-beta, they fully transitioned already thanks to + // eager rent collection. So, this check is irrelevant, strictly speaking. match operating_mode { OperatingMode::Development => slot >= 5_800_000, - OperatingMode::Stable => true, - OperatingMode::Preview => true, + _ => true, } }