Skip to content

Commit

Permalink
tests: assign baseTx when pair cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Oct 19, 2023
1 parent c0f6357 commit 8900036
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p_beef_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func calculateMerkleRoot(baseTx string, offset uint64, cmp []map[string]uint64)
}
tx2 := keyByValue(cmp[i], newOffset)
if tx2 == nil {
fmt.Println("could not find pair")
return "", errors.New("could not find pair")
fmt.Println("could not find pair, using base tx")
tx2 = &baseTx
}

if newOffset > offset {
Expand Down

0 comments on commit 8900036

Please sign in to comment.