mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add a non-canonical SCALE derivations feature
Enables representing IUMT within `StorageValues`. Applied to a variety of values. Fixes a bug where `Some([0; 32])` would be considered a valid block anchor.
This commit is contained in:
@@ -67,7 +67,8 @@ impl UnbalancedMerkleTree {
|
||||
}
|
||||
|
||||
/// An unbalanced Merkle tree which is incrementally created.
|
||||
#[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
#[cfg_attr(feature = "non_canonical_scale_derivations", derive(scale::Encode, scale::Decode))]
|
||||
pub struct IncrementalUnbalancedMerkleTree {
|
||||
/// (number of children under branch, branch hash)
|
||||
branches: Vec<(u64, [u8; 32])>,
|
||||
|
||||
Reference in New Issue
Block a user