Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions chainntnfs/neutrinonotify/neutrino.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,26 +471,27 @@ chainScan:
}
blockHash := header.BlockHash()

// With the hash computed, we can now fetch the extended filter
// With the hash computed, we can now fetch the basic filter
// for this height.
extFilter, err := n.p2pNode.GetCFilter(blockHash, true)
regFilter, err := n.p2pNode.GetCFilter(blockHash,
wire.GCSFilterRegular)
if err != nil {
chainntnfs.Log.Errorf("unable to retrieve extended "+
chainntnfs.Log.Errorf("unable to retrieve regular "+
"filter for height=%v: %v", scanHeight, err)
return false
}

// If the block has no transactions other than the coinbase
// transaction, then the filter may be nil, so we'll continue
// forward int that case.
if extFilter == nil {
if regFilter == nil {
continue
}

// In the case that the filter exists, we'll attempt to see if
// any element in it match our target txid.
key := builder.DeriveKey(&blockHash)
match, err := extFilter.Match(key, targetHash[:])
match, err := regFilter.Match(key, targetHash[:])
if err != nil {
chainntnfs.Log.Errorf("unable to query filter: %v", err)
return false
Expand Down
10 changes: 5 additions & 5 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import:
- proto
- package: github.com/howeyc/gopass
- package: github.com/roasbeef/btcd
version: a64d018fd91151b842522d64771610712565d30a
version: be2fceadae0af7355eca1eb3716c6f9c88d4fc20
subpackages:
- blockchain
- btcec
Expand All @@ -27,14 +27,14 @@ import:
- package: github.com/roasbeef/btcrpcclient
version: d0f4db8b4dad0ca3d569b804f21247c3dd96acbb
- package: github.com/roasbeef/btcutil
version: 1584022350b4400b511beab6a013f0189adeef40
version: c4646eb27366f887b9e034ce91510fe720a31201
subpackages:
- bloom
- coinset
- hdkeychain
- txsort
- package: github.com/roasbeef/btcwallet
version: fbd5b82e8efe29729e2c7ebed5900a210e931df2
version: ba1ef885d5d280a5fd222bdf78f708c855f22c81
subpackages:
- chain
- waddrmgr
Expand Down Expand Up @@ -71,7 +71,7 @@ import:
subpackages:
- chaincfg
- package: github.com/lightninglabs/neutrino
version: 01dcf832a5783e57ca6bc8d7f06c3456d2e00d88
version: 2fb43209a6f54fbf78ba71b50623503db611c371
- package: gopkg.in/macaroon.v1
- package: gopkg.in/macaroon-bakery.v1
- package: github.com/juju/loggo
Expand Down
2 changes: 1 addition & 1 deletion routing/chainview/neutrino.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func (c *CfFilteredChainView) FilterBlock(blockHash *chainhash.Hash) (*FilteredB
// Next, using the block, hash, we'll fetch the compact filter for this
// block. We only require the regular filter as we're just looking for
// outpoint that have been spent.
filter, err := c.p2pNode.GetCFilter(*blockHash, false)
filter, err := c.p2pNode.GetCFilter(*blockHash, wire.GCSFilterRegular)
if err != nil {
return nil, err
}
Expand Down