@@ -10,11 +10,12 @@ import (
1010 "sync/atomic"
1111 "time"
1212
13+ "github.com/btcsuite/btcd/address/v2"
1314 "github.com/btcsuite/btcd/btcjson"
14- "github.com/btcsuite/btcd/btcutil"
15- "github.com/btcsuite/btcd/chaincfg/ chainhash"
16- "github.com/btcsuite/btcd/txscript"
17- "github.com/btcsuite/btcd/wire"
15+ "github.com/btcsuite/btcd/btcutil/v2 "
16+ "github.com/btcsuite/btcd/chainhash/v2 "
17+ "github.com/btcsuite/btcd/txscript/v2 "
18+ "github.com/btcsuite/btcd/wire/v2 "
1819 "github.com/btcsuite/btcwallet/waddrmgr"
1920 "github.com/btcsuite/btcwallet/wtxmgr"
2021 "github.com/davecgh/go-spew/spew"
@@ -267,7 +268,7 @@ func (c *BitcoindClient) Notifications() <-chan interface{} {
267268// transaction pays to any of the given addresses.
268269//
269270// NOTE: This is part of the chain.Interface interface.
270- func (c * BitcoindClient ) NotifyReceived (addrs []btcutil .Address ) error {
271+ func (c * BitcoindClient ) NotifyReceived (addrs []address .Address ) error {
271272 c .updateWatchedFilters (addrs )
272273
273274 _ = c .NotifyBlocks ()
@@ -385,10 +386,10 @@ func (c *BitcoindClient) shouldNotifyBlocks() bool {
385386//
386387// The current filters supported are of the following types:
387388//
388- // []btcutil .Address
389+ // []address .Address
389390// []wire.OutPoint
390391// []*wire.OutPoint
391- // map[wire.OutPoint]btcutil .Address
392+ // map[wire.OutPoint]address .Address
392393// []chainhash.Hash
393394// []*chainhash.Hash
394395func (c * BitcoindClient ) LoadTxFilter (reset bool , filters ... interface {}) error {
@@ -401,8 +402,8 @@ func (c *BitcoindClient) LoadTxFilter(reset bool, filters ...interface{}) error
401402 // filter types, and the second to actually update our filters.
402403 for _ , filter := range filters {
403404 switch filter := filter .(type ) {
404- case []btcutil .Address , []wire.OutPoint , []* wire.OutPoint ,
405- map [wire.OutPoint ]btcutil .Address , []chainhash.Hash ,
405+ case []address .Address , []wire.OutPoint , []* wire.OutPoint ,
406+ map [wire.OutPoint ]address .Address , []chainhash.Hash ,
406407 []* chainhash.Hash :
407408
408409 // Proceed to check the next filter type.
@@ -469,7 +470,7 @@ func (c *BitcoindClient) RescanBlocks(
469470// Rescan rescans from the block with the given hash until the current block,
470471// after adding the passed addresses and outpoints to the client's watch list.
471472func (c * BitcoindClient ) Rescan (blockHash * chainhash.Hash ,
472- addresses []btcutil .Address , outPoints map [wire.OutPoint ]btcutil .Address ) error {
473+ addresses []address .Address , outPoints map [wire.OutPoint ]address .Address ) error {
473474
474475 // A block hash is required to use as the starting point of the rescan.
475476 if blockHash == nil {
@@ -1355,7 +1356,7 @@ func (c *BitcoindClient) updateWatchedFilters(update any) {
13551356
13561357 switch update := update .(type ) {
13571358 // We're adding the addresses to our filter.
1358- case []btcutil .Address :
1359+ case []address .Address :
13591360 for _ , addr := range update {
13601361 c .watchedAddresses [addr .String ()] = struct {}{}
13611362 }
@@ -1373,7 +1374,7 @@ func (c *BitcoindClient) updateWatchedFilters(update any) {
13731374
13741375 // We're adding the outpoints that map to the scripts
13751376 // that we should scan for to our filter.
1376- case map [wire.OutPoint ]btcutil .Address :
1377+ case map [wire.OutPoint ]address .Address :
13771378 for op := range update {
13781379 c .watchedOutPoints [op ] = struct {}{}
13791380 }
0 commit comments