Skip to content

Commit

Permalink
chain: update Rescan method for bitcoind to adhere to new interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Jul 17, 2018
1 parent bc47007 commit b29e917
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chain/bitcoind.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit b29e917

Please sign in to comment.