Skip to content

Commit

Permalink
Fix/nil pointer in tree (#77)
Browse files Browse the repository at this point in the history
* nil pointer equality check

Signed-off-by: Darren Kellenschwiler <[email protected]>
  • Loading branch information
sirdeggen authored Nov 7, 2023
1 parent fffcedb commit ea2407e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bump.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func NewBUMPFromMerkleTreeAndIndex(blockHeight uint64, merkleTree []*chainhash.H
o := uint64(offset)
thisLeaf := leaf{Offset: &o}
hash := merkleTree[levelOffset+offset]
if hash.IsEqual(&chainhash.Hash{}) {
if hash.IsEqual(nil) {
thisLeaf.Duplicate = &t
} else {
sh := hash.String()
Expand Down

0 comments on commit ea2407e

Please sign in to comment.