Skip to content

Commit ed8d0c1

Browse files
committed
Make sure we don't forget hashing new fields in the future.
1 parent 80cef74 commit ed8d0c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

linera-execution/src/execution.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ where
5757
#[derive(Serialize, Deserialize)]
5858
struct ExecutionStateViewHash([u8; 32]);
5959
impl BcsHashable<'_> for ExecutionStateViewHash {}
60+
let ExecutionStateView { system, users } = self;
6061
let mut hasher = linera_views::sha3::Sha3_256::default();
61-
hasher.update_with_bytes(&self.system.historical_hash().await?)?;
62-
hasher.update_with_bytes(&self.users.historical_hash().await?)?;
62+
hasher.update_with_bytes(&system.historical_hash().await?)?;
63+
hasher.update_with_bytes(&users.historical_hash().await?)?;
6364
let output = hasher.finalize();
6465
Ok(CryptoHash::new(&ExecutionStateViewHash(output.into())))
6566
}

0 commit comments

Comments
 (0)