chain: also accept map[wire.OutPoint]btcutil.Address for bitcoind rescans
In this commit, we update bitcoind to also accept a mapping from outpoint to address for its implementation of the recan RPC. We do this as in the near future, when bitcoind implements BIP 158 indexing, then we'll be able to utilize that to do rescans.
This commit is contained in:
parent
6a0e6da280
commit
5b3d124de2
1 changed files with 11 additions and 1 deletions
|
@ -229,7 +229,8 @@ func (c *BitcoindClient) notifying() bool {
|
|||
|
||||
// LoadTxFilter updates the transaction watchlists for the client. Acceptable
|
||||
// arguments after `reset` are any combination of []btcutil.Address,
|
||||
// []wire.OutPoint, []*wire.OutPoint, []chainhash.Hash, and []*chainhash.Hash.
|
||||
// []wire.OutPoint, []*wire.OutPoint, []chainhash.Hash,
|
||||
// map[wire.OutPoint]btcutil.Address, and []*chainhash.Hash.
|
||||
func (c *BitcoindClient) LoadTxFilter(reset bool,
|
||||
watchLists ...interface{}) error {
|
||||
|
||||
|
@ -254,16 +255,25 @@ func (c *BitcoindClient) LoadTxFilter(reset bool,
|
|||
|
||||
for _, watchList := range watchLists {
|
||||
switch list := watchList.(type) {
|
||||
|
||||
case map[wire.OutPoint]btcutil.Address:
|
||||
sendList(list)
|
||||
|
||||
case []wire.OutPoint:
|
||||
sendList(list)
|
||||
|
||||
case []*wire.OutPoint:
|
||||
sendList(list)
|
||||
|
||||
case []btcutil.Address:
|
||||
sendList(list)
|
||||
|
||||
case []chainhash.Hash:
|
||||
sendList(list)
|
||||
|
||||
case []*chainhash.Hash:
|
||||
sendList(list)
|
||||
|
||||
default:
|
||||
log.Warnf("Couldn't add item to filter: unknown type")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue