Commit Graph

9 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
8ce8c29af6 chainntfns: add basic tests for confirmation+spending notifications
* The tests as written will be general to all future implementations of
ChainNotifier allowing future implementers to easily ensure their
implementation meets the expected behavior.

* The tests will be moved to the outer directory once a registration
mechanism for notifier implementations is in place.
2016-02-26 17:38:31 -08:00
Olaoluwa Osuntokun
e92fc5f495 chainntfs: switch BtcdNotifier to directly use btcrpcclient
* Turns out the NotificationServer on btcwallet doesn’t sever full
blocks, nor notify for arbitrary transactions. Instead, we now create a
new client specifically for BtcdNotifier.

* Final implementation is simpler, less dependent on newer btcwallet
features in flux. Additionally, this decouples the chain notifications
from the wallet. Enabling reliance on btcd for notifications, in
conjunction with an independent wallet that satisfies the to-be-drafted
Wallet interface.
2016-02-26 17:38:31 -08:00
Olaoluwa Osuntokun
1c59dfc75c chainntfs: fix the Pop method on confirmationHeap 2016-02-26 17:38:31 -08:00
Olaoluwa Osuntokun
3d478cdd3e chainntfs: use btcwallet's new NotificationServer for BtcdNotifier
* Rather than rely on the legacy notification interface which may be
deprecated in the near future, we’ll now switch to using the
NotificationSever.

* Negative confirmation notifications due to re-orgs are still
unimplemented however.
2016-02-26 17:38:30 -08:00
Olaoluwa Osuntokun
9fb8045bd2 chainntfns: remove source.go it's no longer needed 2016-02-26 17:38:30 -08:00
Olaoluwa Osuntokun
c7402f3462 chainntfns: update BtcdNotifier to adhere to new ChainNotifier interface
* Re-orgs are still unhanded.

* RegisterSpendNtfn should perhaps also register directly with the rpc
client instead of pushing the responsibility to the caller.
2016-02-26 17:38:30 -08:00
Tadge Dryja
2815afebb7 update imports to github 2016-01-16 10:45:54 -08:00
Olaoluwa Osuntokun
5f705be63b chainntfs: introduce ChainConnection interface to avoid import cycle and for future tests
* Looks rather hack atm. Put in place so progress can be had with
lnwallet before notes is finished.
2016-01-14 23:58:04 -08:00
Olaoluwa Osuntokun
986eb83ceb chainntfs: create new ChainNotifier for bfcd-based notifications
* Currently depends on the wallet, but that will change in the near
future due to new additions to btcwallet currently under review.
* Re-orgs aren’t intelligently handled yet. To be done along with tests
in a later commit.
2016-01-14 23:56:11 -08:00