-
Notifications
You must be signed in to change notification settings - Fork 55
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
[deps] Update electrsd
to 0.32.0
#120
base: master
Are you sure you want to change the base?
[deps] Update electrsd
to 0.32.0
#120
Conversation
Pull Request Test Coverage Report for Build 14040929389Details
💛 - Coveralls |
0780429
to
2a5d7fb
Compare
electrsd
to 0.32electrsd
to 0.32
2a5d7fb
to
0e02d79
Compare
For unit tests
|
electrsd
to 0.32electrsd
to 0.32.0
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.
utACK 0e02d79
assert_eq!(tx_info.status.block_height, tx_res.info.blockheight); | ||
assert_eq!(tx_info.status.block_hash, tx_res.info.blockhash); | ||
assert_eq!(tx_info.status.block_time, tx_res.info.blocktime); | ||
// TODO(corepc): No .block_height field on GetTransaction ? |
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.
Oh, it's unfortunate, might take the opportunity and add it too as I need to finish my work on adding the other mining RPCs required for the BDK upgrade.
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.
tACK 0e02d79
It looks pretty straight-forward, with the two caveats of block_height
and block_time
fields.
src/lib.rs
Outdated
tx_info.status.block_hash.map(|hash| hash.to_string()), | ||
tx_res.block_hash | ||
); | ||
assert!(tx_info.status.block_time >= Some(tx_res.time as u64)); |
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.
Any reason to assert with >=
and against tx.time
instead ?
I've tried to use the available block_time
, but didn't understand why it now keeps being off-by-one 🤔.
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.
I was confused by that too, might need investigating.
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.
I have some suggested changes here: oleonardolima@e732a5b, that reduce a little the usage of parsing, relying on corepc methods instead.
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.
FWIW using the block_time
now seems to be working just fine, I guess the off-by-one error I was getting was related to the block_height
, which fetching by block_hash
solves the issue.
- use specific methods such as: `into_model()`, and `block_hash()` to improve the usage of corepc client and it's types.
Updates
electrsd
dev dependency to 0.32.0Updated pinned deps needed to build on rust 1.63.0
fixes #119
fixes #117