-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
test: legacy descriptors #1130
base: master
Are you sure you want to change the base?
test: legacy descriptors #1130
Conversation
"shoulld be ok when outpoint does match psbt_input" | ||
"should be ok when outpoint does match psbt_input" |
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.
This typo was autofixed by my linter.
This is ready, Cc @notmandatory and @danielabrozzoni. (PS: Thanks for all the help, Daniela) |
@@ -12,7 +12,7 @@ members = [ | |||
"example-crates/wallet_esplora_blocking", | |||
"example-crates/wallet_esplora_async", | |||
"nursery/tmp_plan", | |||
"nursery/coin_select" | |||
"nursery/coin_select", |
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.
autoformat
#[allow(unused_mut)] | ||
#[allow(unused_mut)] |
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.
autoformat
e47eedb
to
d5bf32c
Compare
/// A floating point assert! that takes an additional third argument `delta` | ||
/// as a tolerance value when test for equality the first and second argument. | ||
macro_rules! assert_delta { | ||
($x:expr, $y:expr, $d:expr) => { | ||
if !($x - $y < $d || $y - $x < $d) { | ||
panic!(); | ||
} | ||
}; | ||
} | ||
|
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.
This the way I've found to ignore rounding errors when comparing FeeRate::from_sat_per_vb
after the wallet signed with PKH descriptor.
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 think once #1141 is in you'll be able to use a different function to compare fee rates like to_sat_per_kwu(self) or to_sat_per_vb_ceil(self).
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.
fix: typo
d5bf32c
to
600824e
Compare
I think the proposed tests are useful and a great addition. However the PR has become stale and I guess we could move it out from |
Description
We currently don't have much tests with legacy descriptors (
pkh
).This PR adds some, mainly focused on fee stuff.
Notes to the reviewers
This discussion came up on #1115 and also in #1129 (it doesn't fully close).
Changelog notice
Added
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: