Backport bitcoin#15773: test: Add BitcoinTestFramework::sync_* methods (incomplete backport)#3409
Merged
Merged
Conversation
…ions and confusion -BEGIN VERIFY SCRIPT- FILE_LIST=$(git grep -l 'def sync_blocks' ./test/functional/*.py) sed -i -e 's/def sync_blocks/def send_blocks/g' $FILE_LIST sed -i -e 's/self.sync_blocks/self.send_blocks/g' $FILE_LIST -END VERIFY SCRIPT-
f6748af to
7f53935
Compare
PastaPastaPasta
requested changes
Apr 12, 2020
PastaPastaPasta
left a comment
Member
There was a problem hiding this comment.
Looks good overall, two comments and are you forgetting bitcoin@fafe5f0?
7f53935 to
424fee4
Compare
Instead of doing it in every place it's needed
-BEGIN VERIFY SCRIPT- sed -i -e 's/sync_blocks(self.nodes)/self.sync_blocks()/g' $(git grep -l 'sync_blocks(self.nodes)' ./test/functional/*.py) sed -i -e 's/sync_mempools(self.nodes)/self.sync_mempools()/g' $(git grep -l 'sync_mempools(self.nodes)' ./test/functional/*.py) sed -i -e 's/ sync_blocks(/ self.sync_blocks(/g' $(git grep -l sync_blocks ./test/functional/*.py) sed -i -e 's/ sync_mempools(/ self.sync_mempools(/g' $(git grep -l sync_mempools ./test/functional/*.py) -END VERIFY SCRIPT-
424fee4 to
00f0867
Compare
Author
|
@Pasta regarding missing bitcoin@fafe5f0, please see the PR description (I added the info about fafe5f0 a few minutes after creating the PR) |
Author
|
fyi, tests will verify likely not get green with this PR as a lot of other failures are fixed with #3410 |
Member
Whoops! I guess it is a good thing to read the whole PR description! In that case can we update the PR title to say "partial"? |
Author
|
@PastaPastaPasta I added (incomplete backport) to the PR description |
Author
gades
pushed a commit
to cosanta/cosanta-core
that referenced
this pull request
Feb 22, 2022
…s (incomplete backport) (dashpay#3409) * scripted-diff: Rename sync_blocks to send_blocks to avoid name collisions and confusion -BEGIN VERIFY SCRIPT- FILE_LIST=$(git grep -l 'def sync_blocks' ./test/functional/*.py) sed -i -e 's/def sync_blocks/def send_blocks/g' $FILE_LIST sed -i -e 's/self.sync_blocks/self.send_blocks/g' $FILE_LIST -END VERIFY SCRIPT- * test: Pass at most one node group to sync_all * test: Add BitcoinTestFramework::sync_* methods * Move bumping of mocktime into BitcoinTestFramework.sync_mempool Instead of doing it in every place it's needed * scripted-diff: use self.sync_* methods -BEGIN VERIFY SCRIPT- sed -i -e 's/sync_blocks(self.nodes)/self.sync_blocks()/g' $(git grep -l 'sync_blocks(self.nodes)' ./test/functional/*.py) sed -i -e 's/sync_mempools(self.nodes)/self.sync_mempools()/g' $(git grep -l 'sync_mempools(self.nodes)' ./test/functional/*.py) sed -i -e 's/ sync_blocks(/ self.sync_blocks(/g' $(git grep -l sync_blocks ./test/functional/*.py) sed -i -e 's/ sync_mempools(/ self.sync_mempools(/g' $(git grep -l sync_mempools ./test/functional/*.py) -END VERIFY SCRIPT- * Pass nodes into bump_mocktime Co-authored-by: MarcoFalke <falke.marco@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This backports bitcoin#15773 and also moves the
bump_mocktimecall into the new TestFramework.sync_mempool method, instead of doing this for everysync_mempoolcall. This is needed as it turned out that much more places need this logic as otherwise tests fail randomly.Backport is done commit by commit and scripted diffs are not really backported but instead re-applied to ensure we don't miss any Dash specific places.
I left out fafe5f0, as it had too many conflicts. Better to do this later by redoing the lint checks and following the suggestions.