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:
1 file changed
+10
-5
@@ -1472,15 +1472,20 @@ func testTransactionSubscriptions(miner *rpctest.Harness,
|
|||||||
// We'll also ensure that the client is able to send our new
|
// We'll also ensure that the client is able to send our new
|
||||||
// notifications when we _create_ transactions ourselves that spend our
|
// notifications when we _create_ transactions ourselves that spend our
|
||||||
// own outputs.
|
// own outputs.
|
||||||
b := txscript.NewScriptBuilder()
|
addr, err := alice.NewAddress(
|
||||||
b.AddOp(txscript.OP_RETURN)
|
lnwallet.WitnessPubKey, false,
|
||||||
outputScript, err := b.Script()
|
lnwallet.DefaultAccountName,
|
||||||
require.NoError(t, err, "unable to make output script")
|
)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
outputScript, err := txscript.PayToAddrScript(addr)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
burnOutput := wire.NewTxOut(outputAmt, outputScript)
|
burnOutput := wire.NewTxOut(outputAmt, outputScript)
|
||||||
tx, err := alice.SendOutputs(
|
tx, err := alice.SendOutputs(
|
||||||
[]*wire.TxOut{burnOutput}, 2500, 1, labels.External,
|
[]*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()
|
txid := tx.TxHash()
|
||||||
err = waitForMempoolTx(miner, &txid)
|
err = waitForMempoolTx(miner, &txid)
|
||||||
require.NoError(t, err, "tx not relayed to miner")
|
require.NoError(t, err, "tx not relayed to miner")
|
||||||
|
|||||||
Reference in new issue
Block a user