diff --git a/rescan.go b/rescan.go index 185c5f96..ebf32f07 100644 --- a/rescan.go +++ b/rescan.go @@ -74,6 +74,10 @@ type ChainSource interface { // // TODO(wilmer): extend with best hash as well. Subscribe(bestHeight uint32) (*blockntfns.Subscription, error) + + // IsCurrent returns true if the backend chain thinks that its view of + // the network is current. + IsCurrent() bool } // ScanProgressHandler is used in rescanOptions to update the caller with the diff --git a/rescan_test.go b/rescan_test.go index e611eb90..8720c33c 100644 --- a/rescan_test.go +++ b/rescan_test.go @@ -272,6 +272,12 @@ func (c *mockChainSource) setFailGetFilter(b bool) { c.failGetFilter = b } +// IsCurrent returns true if the backend chain thinks that its view of +// the network is current. +func (c *mockChainSource) IsCurrent() bool { + return true +} + // GetCFilter returns the filter of the given type for the block with the given // hash. func (c *mockChainSource) GetCFilter(hash chainhash.Hash,