routing/chainview: make filter updates synchronous for neutrino
This commit fixes a possible race condition wherein a call to FilterBlock after a call to UpdateFilter would result in the call to FilterBlock not yet using the updated filter. We fix this by ensuring the internal chain filter is updated by the time the call to FilterBlock returns.
This commit is contained in:
2 files changed
+22
-8
No files matched your search
@@ -361,6 +361,7 @@ func (b *BtcdFilteredChainView) chainFilterer() {
|
||||
type filterUpdate struct {
|
||||
newUtxos []wire.OutPoint
|
||||
updateHeight uint32
|
||||
done chan struct{}
|
||||
}
|
||||
|
||||
// UpdateFilter updates the UTXO filter which is to be consulted when creating
|
||||
|
||||
Reference in new issue
Block a user