Skip to content

Commit 72783dd

Browse files
committed
Merge #176: fix: vbavailable map in GetBlockTemplateResult
1f5c57a fix: version_bits_available maps String to u32 (0xb10c) Pull request description: PR #163 implemented support for `getblocktemplate`. However, during the implementation the `version_bits_available` HashMap the map fields were switched. This became apparent during testing against a v0.21.1 Bitcoin Core node, which includes support for the Taproot softfork via the 2nd version bit. Previously, no softfork was defined. ``` $ bitcoin-cli getblocktemplate "{\"rules\": [\"segwit\"]}" ... "vbavailable": { "taproot": 2 }, ... ``` ACKs for top commit: sgeisler: utACK 1f5c57a tcharding: utACK 1f5c57a Tree-SHA512: ebae449b93ca8d428e8c0e6dcbeca20765966500e3582368b1a6dc3a60e3205c507121b06a22b3e0e4091efc4828cc17dd65049afebf09695d9a5abc50b1dc5c
2 parents a5844c7 + 1f5c57a commit 72783dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ pub struct GetBlockTemplateResult {
15131513
pub capabilities: Vec<GetBlockTemplateResultCapabilities>,
15141514
/// Set of pending, supported versionbit (BIP 9) softfork deployments
15151515
#[serde(rename = "vbavailable")]
1516-
pub version_bits_available: HashMap<u32, String>,
1516+
pub version_bits_available: HashMap<String, u32>,
15171517
/// Bit mask of versionbits the server requires set in submissions
15181518
#[serde(rename = "vbrequired")]
15191519
pub version_bits_required: u32,

0 commit comments

Comments
 (0)