chain: update block filterer unit tests

This commit is contained in:
Olaoluwa Osuntokun 2018-07-16 19:18:05 -07:00
parent dbb7ae6668
commit fdca047246

View file

@ -8,6 +8,7 @@ import (
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcwallet/chain"
)
@ -272,9 +273,9 @@ func TestBlockFiltererOneInOneOut(t *testing.T) {
// Add each of their single previous outpoints to the set of watched
// outpoints to filter for.
watchedOutPoints := make(map[wire.OutPoint]struct{})
watchedOutPoints[firstTx.TxIn[0].PreviousOutPoint] = struct{}{}
watchedOutPoints[lastTx.TxIn[0].PreviousOutPoint] = struct{}{}
watchedOutPoints := make(map[wire.OutPoint]btcutil.Address)
watchedOutPoints[firstTx.TxIn[0].PreviousOutPoint] = &btcutil.AddressWitnessPubKeyHash{}
watchedOutPoints[lastTx.TxIn[0].PreviousOutPoint] = &btcutil.AddressWitnessPubKeyHash{}
// Construct a filter request, watching only for the outpoints above,
// and construct a block filterer.