lnd.xprv/chainntnfs/btcdnotify
Olaoluwa Osuntokun dfd9f6d1ca
chainntnfs/btcdnotify: fix historical confirmation dispatch bugs
This commit fixes to distinct bugs in the way we previously dipatched
notifications for transactions which needed a historical dispatch.

Previously we would compare transactions when scanning the block using
the `tx.Hash` field. This was incorrect has the `Hash` field is
actually the wtxid, not the txid which should be the item being
compared. We fix this within the second bug fix by actually using the
txid to find the proper transaction.

The second fix has to due with a slight race condition which led to an
off-by-one error when dispatching the historical confirmation. If while
we were dispatching the confirmation, a new block was found, then we
could calculate the wrong block height (off by one) as we were using
the ‘currentHeight’ instead the height of the block which included the
transaction.
2017-05-15 17:47:07 -07:00
..
btcd.go chainntnfs/btcdnotify: fix historical confirmation dispatch bugs 2017-05-15 17:47:07 -07:00
confheap.go chainntnfs/btcdnotify: update BtcdNotifer to recent ChainNotifier API change 2016-12-27 16:43:58 -08:00
driver.go chainntnfs: add cross interface implementation tests 2016-09-01 19:13:10 -07:00