Use confirms func to find number of confirmations.
This commit is contained in:
parent
2bb41582c9
commit
51fb9ad619
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ func selectInputs(utxos []*tx.RecvTxOut, amt int64,
|
||||||
if confirmed(minconf, utxo.Height(), bs.Height) {
|
if confirmed(minconf, utxo.Height(), bs.Height) {
|
||||||
// Coinbase transactions must have 100 confirmations before
|
// Coinbase transactions must have 100 confirmations before
|
||||||
// they may be spent.
|
// they may be spent.
|
||||||
if utxo.IsCoinbase() && bs.Height-utxo.Height()+1 < 100 {
|
if utxo.IsCoinbase() && confirms(utxo.Height(), bs.Height) < 100 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
eligible = append(eligible, utxo)
|
eligible = append(eligible, utxo)
|
||||||
|
|
Loading…
Reference in a new issue