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
Redo tx test #1338
base: master
Are you sure you want to change the base?
Redo tx test #1338
Conversation
4488339
to
e20ae80
Compare
e20ae80
to
6d573f8
Compare
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.
Thanks for the work on this! It's good to see ChainPosition
removed as an anchor.
However, please go over the ticket before marking it for review. It seems you have missed a couple of things.
Additionally, can you add docstr comments for each test? I think it's handy to have.
txid: Txid::from_str( | ||
"0619eff85fd33f55f61af87ee1b612d3e2a26d1aed5f130e9bc74e6d0928d643" | ||
) | ||
.unwrap(), |
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.
nit: can we use h!("txA")
here? Or even better, have a variable for the outpoint and txout.
let update_ops = [( | ||
OutPoint::new(h!("tx2"), 0), | ||
#[test] | ||
fn insert_full_tx_after_partial_tx_inserted() { |
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 test is implemented differently than what is stated in the ticket. We want to reintroduce the partial tx as a full tx. In other words, the partial tx should have the same txid as the full tx.
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.
Also we are missing the test where we insert a partial tx after a full tx.
last_seen: [(h!("tx2"), 1000000)].into() | ||
} | ||
#[test] | ||
fn insert_txouts() { |
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 really meant for this to be part of insert_full_tx_after_partial_tx
and insert_partial_tx_after_full_tx
(not implemented yet). I.e. as scenarios that we loop through.
Description
Fix #1331
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: