aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorDavid Gumberg <davidzgumberg@gmail.com>2022-10-18 19:59:58 -0700
committerDavid Gumberg <davidzgumberg@gmail.com>2023-02-20 11:38:52 -0700
commit04f270b4358417fc2827b9f91717816062b1864e (patch)
tree3ec2e465baae861524e7ba25cddd0ccfc664c491 /src/util
parent8ae2808a4354e8dcc697f76bacc5e2f2befe9220 (diff)
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`.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/error.cpp2
-rw-r--r--src/util/error.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/util/error.cpp b/src/util/error.cpp
index 193265c842..309877d067 100644
--- a/src/util/error.cpp
+++ b/src/util/error.cpp
@@ -33,6 +33,8 @@ bilingual_str TransactionErrorString(const TransactionError err)
return Untranslated("Specified sighash value does not match value stored in PSBT");
case TransactionError::MAX_FEE_EXCEEDED:
return Untranslated("Fee exceeds maximum configured by user (e.g. -maxtxfee, maxfeerate)");
+ case TransactionError::MAX_BURN_EXCEEDED:
+ return Untranslated("Unspendable output exceeds maximum configured by user (maxburnamount)");
case TransactionError::EXTERNAL_SIGNER_NOT_FOUND:
return Untranslated("External signer not found");
case TransactionError::EXTERNAL_SIGNER_FAILED:
diff --git a/src/util/error.h b/src/util/error.h
index 649200c98e..a52a8f47de 100644
--- a/src/util/error.h
+++ b/src/util/error.h
@@ -30,6 +30,7 @@ enum class TransactionError {
PSBT_MISMATCH,
SIGHASH_MISMATCH,
MAX_FEE_EXCEEDED,
+ MAX_BURN_EXCEEDED,
EXTERNAL_SIGNER_NOT_FOUND,
EXTERNAL_SIGNER_FAILED,
INVALID_PACKAGE,