Closed gballet closed 5 years ago
An edge case is when this leaf's RLP has length < 32. In that case when computing the root hash, it's RLP needs to be hashed (despite the length).
Actually, this is true but unrelated to this PR. I have another one in the works that includes the >= 32 bytes test, so I will push it then.
This is preparation work for #28
So far it wasn't possible to insert a key into an empty node. This now makes it possible (by replacing the empty node with a leaf), and is closer to the behavior of geth. It is also going to be necessary in order to insert
null
entries for proofs.