-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: run mempool_reorg.py even with wallet disabled #21178
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
test: run mempool_reorg.py even with wallet disabled #21178
Conversation
8e3f29e to
2ff5034
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
glozow
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.
Concept ACK, very nice!
felipsoarez
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.
Concept ACK
test/functional/mempool_reorg.py
Outdated
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.
Generating blocks takes a few seconds in valgrind, so I am thinking if this test may benefit from using miniwallet.scan_blocks (to be introduced in #21200)
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 had a go but I don't think it helps in this case since the pre-mined chain doesn't send the coinbase transaction to self._address. I made it little bit faster though by only mining 100 blocks instead of 200.
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.
It should. Specifically the last 25 mature blocks (including block 100). And the last 25 immature blocks (including block 200), but you don't need those.
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.
Sorry, there was a bug. If you rebase, the bug should fix itself.
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.
yes, it worked! I updated the PR to use miniwallet.scan_blocks starting from block 76.
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.
Concept ACK. mempool_reorg looks really good except, is there a reason why we aren't using self.log.info(...)? I always thought of them to be really helpful while running tests. Therefore, i think it'll be really nice to add the logs :)
|
@DariusParvin are you planning on following up with the review comments here? |
|
@fanquake Yes, thanks for prompting me, I'll push updates this weekend! |
2ff5034 to
8062fb8
Compare
|
I've addressed the comments, but since there are conflicting changes with #20874, it would probably make sense for that one to get merged first. |
8062fb8 to
2c53863
Compare
2c53863 to
a856630
Compare
|
@stackman27 thanks for your review! I added logs instead of comments, as you suggested. |
maflcko
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.
cr ACK a856630c27cd28186d4e39dd1129f0cae8149261
Is this still waiting on #20874? Given Marco has reviewed this and not #20874 presumably this is closer to merging? 😅 edit: #20874 needs a rebase so yeah I think this is closer to merging. Obvious Concept ACK too btw. |
|
The test is still skipped when wallet is disabled. I think you need to delete: |
a856630 to
ded2a49
Compare
|
@michaelfolkson oops! I removed those lines. And yes, since #21762 where |
25380cf to
65dd482
Compare
michaelfolkson
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 65dd482ba8c87443e4c27dc28f2027625ca43005
Reviewed code, test passes (and not skipped) with wallet disabled.
fb84bd3 to
163e888
Compare
|
Re-ACK 163e8881e88a798462a60b5232a6b4ff62e1969a |
|
|
163e888 to
1c9d072
Compare
- run mempool_reorg.py even when the wallet is not compiled - add `locktime` argument to `create_self_transfer` and `send_self_transfer` - use more logs instead of comments
1c9d072 to
a3f0cbf
Compare
|
thanks @MarcoFalke! typo fixed and rebased |
|
cr ACK a3f0cbf |
Run mempool_reorg.py test even when the wallet is disabled, as discussed in #20078.
As part of this PR I created a new method in
MiniWallet,create_self_transfer, to return a raw tx (without broadcasting it) and its associated utxo.