aergoio/aergo

View on GitHub
pkg/trie/trie_merkle_proof.go

Summary

Maintainability
A
1 hr
Test Coverage
C
74%

Method Trie.merkleProof has 10 return statements (exceeds 4 allowed).
Open

func (s *Trie) merkleProof(root, key []byte, batch [][]byte, height, iBatch int) ([][]byte, bool, []byte, []byte, error) {
    if len(root) == 0 {
        // proove that an empty subtree is on the path of the key
        return nil, false, nil, nil, nil
    }
Severity: Major
Found in pkg/trie/trie_merkle_proof.go - About 1 hr to fix

    Method Trie.verifyInclusionC has 5 return statements (exceeds 4 allowed).
    Open

    func (s *Trie) verifyInclusionC(bitmap, key, leafHash []byte, ap [][]byte, length, keyIndex, apIndex int) []byte {
        if keyIndex == length {
            return leafHash
        }
        if bitIsSet(key, keyIndex) {
    Severity: Major
    Found in pkg/trie/trie_merkle_proof.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status