diff --git a/doc/release-notes-30352.md b/doc/release-notes-30352.md new file mode 100644 index 0000000000000..b67577a466752 --- /dev/null +++ b/doc/release-notes-30352.md @@ -0,0 +1,10 @@ +P2P and network changes +----------------------- + +- Pay To Anchor(P2A) is a new standard witness output type for spending, + a newly recognised output template. This allows for key-less anchor + outputs, with compact spending conditions for additional efficiencies on + top of an equivalent `sh(OP_TRUE)` output, in addition to the txid stability + of the spending transaction. + N.B. propagation of this output spending on the network will be limited + until a sufficient number of nodes on the network adopt this upgrade. diff --git a/src/addresstype.cpp b/src/addresstype.cpp index f199d1b479446..67e643943d4da 100644 --- a/src/addresstype.cpp +++ b/src/addresstype.cpp @@ -87,6 +87,10 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet) addressRet = tap; return true; } + case TxoutType::ANCHOR: { + addressRet = PayToAnchor(); + return true; + } case TxoutType::WITNESS_UNKNOWN: { addressRet = WitnessUnknown{vSolutions[0][0], vSolutions[1]}; return true; diff --git a/src/addresstype.h b/src/addresstype.h index 0152858bad2a3..93cdf66c5b17e 100644 --- a/src/addresstype.h +++ b/src/addresstype.h @@ -9,6 +9,7 @@ #include #include