aboutsummaryrefslogtreecommitdiff
path: root/src/key_io.cpp
diff options
context:
space:
mode:
authorGreg Sanders <gsanders87@gmail.com>2023-11-08 14:07:49 -0500
committerGreg Sanders <gsanders87@gmail.com>2024-07-30 14:06:58 -0400
commit455fca86cfada1823aa28615b5683f9dc73dbb9a (patch)
tree5d87a5a2520bf891297f01481bdb475a9b15e012 /src/key_io.cpp
parent8754d055c65e11fd2afa59f9e5de7c60a9e0ec23 (diff)
policy: Add OP_1 <0x4e73> as a standard output type
These outputs are called anchors, and allow key-less anchor spends which are vsize-minimized versus keyed anchors which require larger outputs when creating and inputs when spending.
Diffstat (limited to 'src/key_io.cpp')
-rw-r--r--src/key_io.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/key_io.cpp b/src/key_io.cpp
index a373a2201d..29002afc45 100644
--- a/src/key_io.cpp
+++ b/src/key_io.cpp
@@ -181,6 +181,10 @@ CTxDestination DecodeDestination(const std::string& str, const CChainParams& par
return tap;
}
+ if (CScript::IsPayToAnchor(version, data)) {
+ return PayToAnchor();
+ }
+
if (version > 16) {
error_str = "Invalid Bech32 address witness version";
return CNoDestination();