-
Notifications
You must be signed in to change notification settings - Fork 43
fix(types): use f64 for GetChainTxStats tx_rate field #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bitcoin Core has always returned txrate as a double since the RPC was added in v0.15 (PR #9733).
jamillambert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 687119b
Thanks for the fix.
|
This should also be tested. It can be added to this PR or as a follow up. |
Change to a Default wallet and fund/mine so we get transactions for `GetChainTxStats` to report meaningful data.
|
Updated existing test. Switced to a GetChainTxStats {
time: 1766036241,
tx_count: 104,
window_final_block_hash: 5d1f1967e8c133164a25a51f9bb125e79c8d2395baaabde8c3767b0220442a66,
window_final_block_height: Some(102),
window_block_count: 101,
window_tx_count: Some(102),
window_interval: Some(17),
tx_rate: Some(6.0)
} |
jamillambert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7ba4142
tcharding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7ba4142
This makes corepc support: - cpu_load and inv_to_send in getpeerinfo (as before) - addconnection - getorphantxs and includes rust-bitcoin/corepc#430 for #312 as well as other improvements in corepc master. Also upgrading the node version feature to v30 from v29.
This makes corepc support: - cpu_load and inv_to_send in getpeerinfo (as before) - addconnection - getorphantxs and includes rust-bitcoin/corepc#430 for #312 as well as other improvements in corepc master. Also upgrading the node version feature to v30 from v29.
corepc now correctly returns tx_rate as f64, matching Bitcoin Core. Upstream fix: rust-bitcoin/corepc#430
Bitcoin Core has always returned
txrateas a double since the RPC was added in v0.15 (PR #9733).The previous type (
i64) causes deserialisation to fail. Here's a minimal example: