Return ErrReachedMaxLevel in Get when appropriate

This commit is contained in:
Eduard S
2020-10-20 12:26:52 +02:00
parent e76f9f6ce0
commit 5a00ae9be5

View File

@@ -451,7 +451,7 @@ func (mt *MerkleTree) Get(k *big.Int) (*big.Int, *big.Int, []*Hash, error) {
}
}
return nil, nil, nil, ErrKeyNotFound
return nil, nil, nil, ErrReachedMaxLevel
}
// Update updates the value of a specified key in the MerkleTree, and updates