mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
lnwallet/test: stop creating burning tx in tests
bitcoind v25.0 updated the `sendrawtransaction` RPC to have an optional argument `maxburnamount` with a default value of 0. This means our existing test that uses burning output cannot be published, hence, we remove the usage of it in our tests and replace it with a normal tx.
This commit is contained in:
parent
11bafe84ff
commit
783e914027
@ -1472,15 +1472,20 @@ func testTransactionSubscriptions(miner *rpctest.Harness,
|
||||
// We'll also ensure that the client is able to send our new
|
||||
// notifications when we _create_ transactions ourselves that spend our
|
||||
// own outputs.
|
||||
b := txscript.NewScriptBuilder()
|
||||
b.AddOp(txscript.OP_RETURN)
|
||||
outputScript, err := b.Script()
|
||||
require.NoError(t, err, "unable to make output script")
|
||||
addr, err := alice.NewAddress(
|
||||
lnwallet.WitnessPubKey, false,
|
||||
lnwallet.DefaultAccountName,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
outputScript, err := txscript.PayToAddrScript(addr)
|
||||
require.NoError(t, err)
|
||||
|
||||
burnOutput := wire.NewTxOut(outputAmt, outputScript)
|
||||
tx, err := alice.SendOutputs(
|
||||
[]*wire.TxOut{burnOutput}, 2500, 1, labels.External,
|
||||
)
|
||||
require.NoError(t, err, "unable to create burn tx")
|
||||
require.NoError(t, err, "unable to create tx")
|
||||
txid := tx.TxHash()
|
||||
err = waitForMempoolTx(miner, &txid)
|
||||
require.NoError(t, err, "tx not relayed to miner")
|
||||
|
Loading…
Reference in New Issue
Block a user