diff --git a/createtx.go b/createtx.go index 8bff5af..611137a 100644 --- a/createtx.go +++ b/createtx.go @@ -23,7 +23,7 @@ import ( "sort" "time" - "github.com/btcsuite/btcchain" + "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcwallet/keystore" @@ -350,7 +350,7 @@ func (w *Wallet) findEligibleOutputs(minconf int, bs *keystore.BlockStamp) ([]tx // Coinbase transactions must have have reached maturity // before their outputs may be spent. if unspent[i].IsCoinbase() { - target := btcchain.CoinbaseMaturity + target := blockchain.CoinbaseMaturity if !unspent[i].Confirmed(target, bs.Height) { continue } diff --git a/txstore/json.go b/txstore/json.go index 482bfca..d16ac4c 100644 --- a/txstore/json.go +++ b/txstore/json.go @@ -17,7 +17,7 @@ package txstore import ( - "github.com/btcsuite/btcchain" + "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcjson" "github.com/btcsuite/btcnet" @@ -125,7 +125,7 @@ func (c *Credit) Category(chainHeight int32) CreditCategory { func (c *Credit) category(chainHeight int32) CreditCategory { if c.isCoinbase() { - if confirmed(btcchain.CoinbaseMaturity, c.BlockHeight, chainHeight) { + if confirmed(blockchain.CoinbaseMaturity, c.BlockHeight, chainHeight) { return CreditGenerate } return CreditImmature diff --git a/txstore/tx.go b/txstore/tx.go index 74f29ec..0e2536c 100644 --- a/txstore/tx.go +++ b/txstore/tx.go @@ -24,7 +24,7 @@ import ( "sync" "time" - "github.com/btcsuite/btcchain" + "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcnet" "github.com/btcsuite/btcutil" @@ -1251,7 +1251,7 @@ func (s *Store) balance(minConf int, chainHeight int32) (btcutil.Amount, error) for _, b := range s.blocks { if confirmed(b.Height) { bal += b.amountDeltas.Spendable - if confirms(b.Height) >= btcchain.CoinbaseMaturity { + if confirms(b.Height) >= blockchain.CoinbaseMaturity { bal += b.amountDeltas.Reward } continue diff --git a/wallet.go b/wallet.go index a72902a..9700b31 100644 --- a/wallet.go +++ b/wallet.go @@ -26,7 +26,7 @@ import ( "sync" "time" - "github.com/btcsuite/btcchain" + "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcjson" "github.com/btcsuite/btcnet" "github.com/btcsuite/btcutil" @@ -941,7 +941,7 @@ func (w *Wallet) ListUnspent(minconf, maxconf int, continue } if credit.IsCoinbase() { - if !credit.Confirmed(btcchain.CoinbaseMaturity, bs.Height) { + if !credit.Confirmed(blockchain.CoinbaseMaturity, bs.Height) { continue } }