From 51fb9ad61903055deaf4e94644926110e29ac31f Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Sun, 13 Apr 2014 23:06:25 -0500 Subject: [PATCH] Use confirms func to find number of confirmations. --- createtx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/createtx.go b/createtx.go index 1037519..fe307f9 100644 --- a/createtx.go +++ b/createtx.go @@ -104,7 +104,7 @@ func selectInputs(utxos []*tx.RecvTxOut, amt int64, if confirmed(minconf, utxo.Height(), bs.Height) { // Coinbase transactions must have 100 confirmations before // they may be spent. - if utxo.IsCoinbase() && bs.Height-utxo.Height()+1 < 100 { + if utxo.IsCoinbase() && confirms(utxo.Height(), bs.Height) < 100 { continue } eligible = append(eligible, utxo)