Skip to content

Commit

Permalink
fix GetSpendableUtxosForPublicKey
Browse files Browse the repository at this point in the history
  • Loading branch information
lazynina committed Jan 9, 2025
1 parent 11773dd commit 587ac72
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3282,10 +3282,11 @@ func (bc *Blockchain) GetSpendableUtxosForPublicKey(spendPublicKeyBytes []byte,
//
// Note we add one to the current block height since it is presumed this
// transaction will at best be mined into the next block.
blockHeight := bc.blockTip().Height + 1
if _isEntryImmatureBlockReward(utxoEntry, blockHeight, bc.params) {
continue
}
// We no longer need to worry about immature block rewards.
//blockHeight := bc.blockTip().Height + 1
//if _isEntryImmatureBlockReward(utxoEntry, blockHeight, bc.params) {
// continue
//}

// Don't consider utxos that are already consumed by the mempool.
if !isInterfaceValueNil(mempool) && mempool.CheckSpend(*utxoEntry.UtxoKey) != nil {
Expand Down

0 comments on commit 587ac72

Please sign in to comment.