Skip to content

Commit

Permalink
Serialize Keccak256 as array, not slice.
Browse files Browse the repository at this point in the history
  • Loading branch information
deuszx committed Jan 16, 2025
1 parent 49a6746 commit 0db975d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion linera-base/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl Serialize for CryptoHash {
if serializer.is_human_readable() {

Check warning on line 166 in linera-base/src/crypto.rs

View workflow job for this annotation

GitHub Actions / lint-cargo-fmt

Diff in /home/runner/work/linera-protocol/linera-protocol/linera-base/src/crypto.rs
serializer.serialize_str(&self.to_string())
} else {
serializer.serialize_newtype_struct("CryptoHash", &self.0)
serializer.serialize_newtype_struct("CryptoHash", &self.0.0)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion linera-chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static STATE_HASH_COMPUTATION_LATENCY: LazyLock<HistogramVec> = LazyLock::new(||
});

/// The BCS-serialized size of an empty `ExecutedBlock`.
const EMPTY_EXECUTED_BLOCK_SIZE: usize = 93;
const EMPTY_EXECUTED_BLOCK_SIZE: usize = 91;

/// An origin, cursor and timestamp of a unskippable bundle in our inbox.
#[derive(Debug, Clone, Serialize, Deserialize, async_graphql::SimpleObject)]
Expand Down
2 changes: 1 addition & 1 deletion linera-chain/src/unit_tests/chain_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async fn test_block_size_limit() {
let mut chain = ChainStateView::new(chain_id).await;

// The size of the executed valid block below.
let maximum_executed_block_size = 713;
let maximum_executed_block_size = 707;

// Initialize the chain.
let mut config = make_open_chain_config();
Expand Down

0 comments on commit 0db975d

Please sign in to comment.