Skip to content

Commit

Permalink
chore(BUX-296): rename tx variables
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Nov 2, 2023
1 parent 63f9ea4 commit 227e706
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bump.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,22 @@ func getOffsetPair(offset uint64) uint64 {
}

func prepareNodes(baseLeaf BUMPLeaf, offset uint64, leafInPair BUMPLeaf, newOffset uint64) (string, string) {
var txHash, tx2Hash string
var baseLeafHash, pairLeafHash string

if baseLeaf.duplicate {
txHash = leafInPair.hash
baseLeafHash = leafInPair.hash
} else {
txHash = baseLeaf.hash
baseLeafHash = baseLeaf.hash
}

if leafInPair.duplicate {
tx2Hash = baseLeaf.hash
pairLeafHash = baseLeaf.hash
} else {
tx2Hash = leafInPair.hash
pairLeafHash = leafInPair.hash
}

if newOffset > offset {
return txHash, tx2Hash
return baseLeafHash, pairLeafHash
}
return tx2Hash, txHash
return pairLeafHash, baseLeafHash
}

0 comments on commit 227e706

Please sign in to comment.