Skip to content

Commit bdc9f9b

Browse files
committed
Merge #263: Add address field for GetRawTransactionResultVoutScriptPubKey
9023cce Add `address` field (thesimplekid) Pull request description: Adds `address` field for support in bitcoin core 22 and later since `addresses` is deprecated. Keeps `addresses` field for backwards compatibility as [mentioned](#214 (comment)) in #214 ACKs for top commit: apoelstra: ACK 9023cce Tree-SHA512: a6af066aee302e11e15b622656ed51f3062c65ebda22e39d6476db382d1c81f26ca0baa86476c3c92b2cdb1834493a4c3403a1e3a0e09bcf1d707bc9b29607f8
2 parents 9186b66 + 9023cce commit bdc9f9b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

json/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,12 @@ pub struct GetRawTransactionResultVoutScriptPubKey {
561561
pub req_sigs: Option<usize>,
562562
#[serde(rename = "type")]
563563
pub type_: Option<ScriptPubkeyType>,
564-
pub addresses: Option<Vec<Address>>,
564+
// Deprecated in Bitcoin Core 22
565+
#[serde(default)]
566+
pub addresses: Vec<Address>,
567+
// Added in Bitcoin Core 22
568+
#[serde(default)]
569+
pub address: Option<Address>,
565570
}
566571

567572
impl GetRawTransactionResultVoutScriptPubKey {

0 commit comments

Comments
 (0)