Skip to content

Commit 1f5c57a

Browse files
committed
fix: version_bits_available maps String to u32
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 }, ... ```
1 parent 27dd8be commit 1f5c57a

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
@@ -1195,7 +1195,7 @@ pub struct GetBlockTemplateResult {
11951195
pub capabilities: Vec<GetBlockTemplateResultCapabilities>,
11961196
/// Set of pending, supported versionbit (BIP 9) softfork deployments
11971197
#[serde(rename = "vbavailable")]
1198-
pub version_bits_available: HashMap<u32, String>,
1198+
pub version_bits_available: HashMap<String, u32>,
11991199
/// Bit mask of versionbits the server requires set in submissions
12001200
#[serde(rename = "vbrequired")]
12011201
pub version_bits_required: u32,

0 commit comments

Comments
 (0)