From 04f270b4358417fc2827b9f91717816062b1864e Mon Sep 17 00:00:00 2001 From: David Gumberg Date: Tue, 18 Oct 2022 19:59:58 -0700 Subject: Add test for unspendable transactions and parameter 'maxburnamount' to sendrawtransaction. 'maxburnamount' sets a maximum value for outputs heuristically deemed unspendable including datacarrier scripts that begin with `OP_RETURN`. --- src/rpc/client.cpp | 1 + src/rpc/mempool.cpp | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src/rpc') diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index 5fe914f0a1..eb91a151b5 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -114,6 +114,7 @@ static const CRPCConvertParam vRPCConvertParams[] = { "signrawtransactionwithkey", 2, "prevtxs" }, { "signrawtransactionwithwallet", 1, "prevtxs" }, { "sendrawtransaction", 1, "maxfeerate" }, + { "sendrawtransaction", 2, "maxburnamount" }, { "testmempoolaccept", 0, "rawtxs" }, { "testmempoolaccept", 1, "maxfeerate" }, { "submitpackage", 0, "package" }, diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp index 44f7435a26..0e202a963d 100644 --- a/src/rpc/mempool.cpp +++ b/src/rpc/mempool.cpp @@ -18,6 +18,7 @@ #include #include #include +#include