Previous to this commit we were able to call `UpdateInvoice` with an
updated that added and cancelled htlcs at the same time. The function
returned an error if there was overlapping between the two htlc set.
However, that behavior was not used in the LND code itself.
Eventually we want to split this method in multiple ones, among them one
for canceling htlcs and another one for adding them. For that reason,
this behavior is not supported anymore.
In this commit, we add a new Rebroadcaster interface to be used for
publishing transactions passively in the background until they've been
confirmed on chain. This is useful if a tx drops out of the mempool, but
then the pool clears down and has more space available to accept the tx
at the current fee level.
In this commit, a small migration is added to the watchtower client DB
to ensure that there is an entry in the towerID-to-sessionID index for
all towers in the db regardless of if they have sessions or not. This is
required as a follow up to migration 1 since that migration only created
entries in the index for towers that had associated sessions which would
lead to "tower not found" errors on start up.
In the NewBitcoindBackend test util function, ensure that the
`rpcpolling` param is switched on in the correct order. Also switch back
to using `ioutil.TempDir` as it seems that the zmq conn strings created
from `t.TempDir()` result in an invalid conn string.
This commit fixes a bug in the wait.NoError function. If the predicate
function, f, passed to the NoError function would hang for the full
timeout, then the `predErr` would remain nil and so a nil error would be
returned from the function. This commit handles that case.
This commit adds a simple struct `futureMsgCache` that embeds a lru
cache with the message ID. A unit test is added to check the eviction
behaves as expected.
This commit removes the slice used when saving future messages into the
cache. Instead, each message is now saved independently into the cache
with a monotonically increasing integer as its ID.
This commit adds a new const to increase the max future messages allowed
from 100 to 1000, which is needed as during IBD a node with lots of
channels might receive many future messages.
The description for TXID in Label Transaction should include a note
that, in the case of GRPC, the TXID needs to be passed in little-endian
(reverse) byte order. A user passing the bytes in big-endian order is
met with an error message stating that the transaction is not found in
the wallet and no other information with which to troubleshoot.