mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
itest: send one more UTXO for neutrino backend
Send another UTXO if this is a neutrino backend. When sweeping anchors, there are two transactions created, `local_sweep_tx` for sweeping Alice's anchor on the local commitment, `remote_sweep_tx` for sweeping her anchor on the remote commitment. Whenever the force close transaction is published, Alice will always create these two transactions to sweep her anchor. On the other hand, when creating the sweep txes, the anchor itself is not able to cover the fee, so another wallet UTXO is needed. In our test case, there's a change output that can be used from the above funding process. And it's used by both sweep txes - when `lnd` happens to create the `remote_sweep_tx` first, it will receive an error since its parent tx, the remote commitment, is not known, hence freeing the change output to be used by `local_sweep_tx`. For neutrino client, however, it will consider the transaction which sweeps the remote anchor as an orphan tx, and it will neither send it to the mempool nor return an error to free the change output. Thus, if the change output is already used in `remote_sweep_tx`, we won't have UTXO to create `local_sweep_tx`.
This commit is contained in:
parent
8df5de3e43
commit
ede86cf08f
1 changed files with 5 additions and 0 deletions
|
@ -688,6 +688,11 @@ func testRevokedCloseRetributionAltruistWatchtowerCase(ht *lntemp.HarnessTest,
|
|||
// directly from the miner.
|
||||
ht.FundCoins(btcutil.SatoshiPerBitcoin, dave)
|
||||
|
||||
// Send one more UTXOs if this is a neutrino backend.
|
||||
if ht.IsNeutrinoBackend() {
|
||||
ht.FundCoins(btcutil.SatoshiPerBitcoin, dave)
|
||||
}
|
||||
|
||||
// In order to test Dave's response to an uncooperative channel
|
||||
// closure by Carol, we'll first open up a channel between them with a
|
||||
// 0.5 BTC value.
|
||||
|
|
Loading…
Add table
Reference in a new issue