Skip to content

Commit

Permalink
todo
Browse files Browse the repository at this point in the history
  • Loading branch information
0xaatif committed May 15, 2024
1 parent 99c196f commit 3568dd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions leader/src/mpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl Mpt {
} else {
return Node::Hash(crate::utils::compat::h256(root)).into();
};
let a = <Vec<Vec<u8>>>::decode(&mut &*data).unwrap();
let a = <Vec<Vec<u8>>>::decode(&mut &*data).unwrap(); // TODO(aatifsyed): use decode_list instead
match a.len() {
17 => {
let value = a[16].clone();
Expand Down Expand Up @@ -140,7 +140,7 @@ pub fn insert_mpt(mpt: &mut Mpt, proof: Vec<Bytes>) {
fn insert_mpt_helper(mpt: &mut Mpt, rlp_node: Bytes) {
mpt.mpt
.insert(keccak(&rlp_node), MptNode(rlp_node.to_vec()));
let a = <Vec<Vec<u8>> as alloy::rlp::Decodable>::decode(&mut &rlp_node[..]).unwrap();
let a = <Vec<Vec<u8>> as alloy::rlp::Decodable>::decode(&mut &rlp_node[..]).unwrap(); // TODO(aatifsyed): use decode_list intead
if a.len() == 2 {
let prefix = a[0].clone();
let is_leaf = (prefix[0] >> 4 == 2) || (prefix[0] >> 4 == 3);
Expand Down

0 comments on commit 3568dd5

Please sign in to comment.