mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Rewrite Inherent data (#1488)
* Implement new inherent data * Fixes compilation on wasm * Fixes after rebase * Switch back to generate inherent stuff by macro * Update after rebase * Apply suggestions from code review Co-Authored-By: bkchr <bkchr@users.noreply.github.com> * Fix compilation after rebase * Address grumbles * Remove `InherentDataProviders` from `Client` * Update wasm files after rebase * Address grumbles * Fixes compilation after latest merge * Last fix
This commit is contained in:
@@ -34,10 +34,10 @@ impl Encode for NodeHeader {
|
||||
fn encode_to<T: Output>(&self, output: &mut T) {
|
||||
match self {
|
||||
NodeHeader::Null => output.push_byte(EMPTY_TRIE),
|
||||
|
||||
|
||||
NodeHeader::Branch(true) => output.push_byte(BRANCH_NODE_WITH_VALUE),
|
||||
NodeHeader::Branch(false) => output.push_byte(BRANCH_NODE_NO_VALUE),
|
||||
|
||||
|
||||
NodeHeader::Leaf(nibble_count) if *nibble_count < LEAF_NODE_THRESHOLD as usize =>
|
||||
output.push_byte(LEAF_NODE_OFFSET + *nibble_count as u8),
|
||||
NodeHeader::Leaf(nibble_count) => {
|
||||
@@ -72,7 +72,6 @@ impl Decode for NodeHeader {
|
||||
|
||||
BRANCH_NODE_NO_VALUE => NodeHeader::Branch(false), // 254
|
||||
BRANCH_NODE_WITH_VALUE => NodeHeader::Branch(true), // 255
|
||||
|
||||
_ => unreachable!(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user