Test Coverage
Our repository prioritizes the robustness and reliability of the implementation. To showcase our commitment to quality, here's a table detailing our extensive test coverage across different components:
📁 File Location | 📌 Function Name | ✅ Test Coverage |
---|---|---|
...mpt/mpt.go | NewMPTMemoryStorage | 100.0% |
...mpt/mpt.go | Has | 100.0% |
...mpt/mpt.go | Get | 100.0% |
...mpt/mpt.go | Put | 100.0% |
...mpt/mpt.go | Delete | 100.0% |
...pebble.go | NewStorage | 75.0% |
...pebble.go | Has | 85.7% |
...pebble.go | Get | 100.0% |
...pebble.go | Put | 100.0% |
...pebble.go | Delete | 100.0% |
...pebble.go | Close | 100.0% |
...commit.go | commit | 83.3% |
...commit.go | handleLeafNode | 77.8% |
...commit.go | handleExtensionNode | 76.9% |
...commit.go | handleBranchNode | 80.0% |
...commit.go | DecodeNode | 71.4% |
...commit.go | reconstructNode | 84.2% |
...commit.go | decodeChild | 80.0% |
...commit.go | SetRootHash | 80.0% |
...commit.go | GetRootHash | 100.0% |
...crypto.go | Keccak256 | 80.0% |
...hash.go | NodeHash | 75.0% |
...hash.go | NodeRaw | 92.0% |
...nibble.go | FromBytes | 100.0% |
...nibble.go | CommonPrefixLength | 100.0% |
...nibble.go | Equal | 100.0% |
...nibble.go | CompactEncoding | 100.0% |
...nibble.go | ToBytes | 100.0% |
...nibble.go | IsLeaf | 100.0% |
...nibble.go | RemoveCompactEncoding | 83.3% |
...branch.go | NewBranchNode | 100.0% |
...branch.go | SetValue | 100.0% |
...branch.go | GetValue | 100.0% |
...branch.go | SetChild | 100.0% |
...branch.go | ChildCount | 100.0% |
...branch.go | HasValue | 100.0% |
...branch.go | ClearValue | 100.0% |
...extension.go | NewExtension | 100.0% |
...hash.go | NewHashNode | 100.0% |
...leaf.go | NewLeafNode | 100.0% |
...proof.go | GenerateProof | 88.6% |
...proof.go | storeNode | 80.0% |
...trie.go | NewTrie | 100.0% |
...trie.go | Hash | 100.0% |
...trie.go | Proof | 100.0% |
...trie.go | Get | 87.5% |
...trie.go | Put | 93.1% |
...trie.go | Commit | 77.8% |
...trie.go | Del | 86.8% |
...trie.go | compressPath | 94.7% |
...trie.go | compressBranchNode | 100.0% |
...trie.go | getRootHash | 87.5% |
...trie.go | handleLeafNodeInsert | 100.0% |
...trie.go | handleExtensionNodeInsert | 94.4% |
📊 Total | (statements) | 90.1% |
📝 Note:
The current implementation of the Merkle Patricia Trie relies on the go-ethereum
library to verify hashes and proofs. However, future revisions are planned to remove this dependency, aiming to reduce the size of the library and ensure independent operability.
Last updated