chainntnfs+chainreg: add interface MempoolWatcher

This commit adds the interface `MempoolWatcher` and uses it in the chain
registry.
This commit is contained in:
yyforyongyu
2023-04-03 21:21:07 +08:00
parent ad5e798392
commit e81d62fc70
4 changed files with 34 additions and 2 deletions

View File

@@ -96,6 +96,9 @@ type BtcdNotifier struct {
// Ensure BtcdNotifier implements the ChainNotifier interface at compile time.
var _ chainntnfs.ChainNotifier = (*BtcdNotifier)(nil)
// Ensure BtcdNotifier implements the MempoolWatcher interface at compile time.
var _ chainntnfs.MempoolWatcher = (*BtcdNotifier)(nil)
// New returns a new BtcdNotifier instance. This function assumes the btcd node
// detailed in the passed configuration is already running, and willing to
// accept new websockets clients.