Commit graph

4 commits

Author SHA1 Message Date
yyforyongyu
f9b1250ecf chainntnfs: remove subscriptions when the relevant tx is confirmed
This commit removes the subscribed inputs from mempool notifier when the
relevant transaction is confirmed.
2023-04-18 18:28:28 -07:00
yyforyongyu
35d1bff321 chainntnfs: add method UnsubscribeEvent to cancel a subscription
This commit adds the method `UnsubscribeEvent` to cancel a single
subscription.
2023-04-18 18:28:27 -07:00
yyforyongyu
318efa4c33 chainntnfs: allow multiple subscriber to the same input
This commit changes the `subscribedInputs` to store a map of subscribers
so multiple subscribers are allowed to receive events from the same
outpoint.
2023-04-18 18:28:27 -07:00
yyforyongyu
208628d7f2 chainntnfs: introduce mempool notifier
This commit adds a mempool notifier which notifies the subscriber the
spending event found in the mempool for a given input.
2023-04-18 18:28:27 -07:00