From b29e917a2402a858a2ea17f41a1e10ede507efaf Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 14 Jun 2018 22:05:20 -0700 Subject: [PATCH] chain: update Rescan method for bitcoind to adhere to new interface --- chain/bitcoind.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/bitcoind.go b/chain/bitcoind.go index 53d0b8b..2611757 100644 --- a/chain/bitcoind.go +++ b/chain/bitcoind.go @@ -313,7 +313,7 @@ func (c *BitcoindClient) RescanBlocks(blockHashes []chainhash.Hash) ( // Rescan rescans from the block with the given hash until the current block, // after adding the passed addresses and outpoints to the client's watch list. func (c *BitcoindClient) Rescan(blockHash *chainhash.Hash, - addrs []btcutil.Address, outPoints []*wire.OutPoint) error { + addrs []btcutil.Address, outPoints map[wire.OutPoint]btcutil.Address) error { if blockHash == nil { return errors.New("rescan requires a starting block hash") @@ -592,10 +592,10 @@ mainLoop: c.watchOutPoints[*op] = struct{}{} } c.clientMtx.Unlock() - case []wire.OutPoint: + case map[wire.OutPoint]btcutil.Address: // We're updating monitored outpoints. c.clientMtx.Lock() - for _, op := range e { + for op := range e { c.watchOutPoints[op] = struct{}{} } c.clientMtx.Unlock()