MCPcopy Create free account
hub / github.com/base/base / test_decode_leaf

Function test_decode_leaf

crates/proof/mpt/src/node.rs:708–713  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

706
707 #[test]
708 fn test_decode_leaf() {
709 const LEAF_RLP: [u8; 11] = hex!("ca8320646f8576657262FF");
710 let expected =
711 TrieNode::Leaf { prefix: Nibbles::unpack(bytes!("646f")), value: bytes!("76657262FF") };
712 assert_eq!(expected, TrieNode::decode(&mut LEAF_RLP.as_slice()).unwrap());
713 }
714
715 #[test]
716 fn test_decode_leaf_or_extension_empty_path_errors() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected