[Tests] Add mempool_limit.py test#7153
Conversation
There was a problem hiding this comment.
Yes. I think this code part is in maxuploadtarget.py, prioritise_transaction.py and pruning.py. Someone should refactor that once. I have original taken this from a test that @sdaftuar wrote.
There was a problem hiding this comment.
It's enough to review this method once and not every time a pull tester PR is opened.
1840f36 to
5d5ada9
Compare
|
Nits addresses: refactored the shared functions (moved to |
There was a problem hiding this comment.
Can you do the same here?
def __init__(self):
self.txouts = create_many_txouts()
There was a problem hiding this comment.
This part needs to be refactored between 4 existing tests.
This PRs intent is not to refactor the test framework instead it should add a mempool limit/eviction test.
There was a problem hiding this comment.
Consider it a NIT but I don't like having the same code in 4 locations. You are guaranteed to get a bug out of that some day. (We already had it with other rpc tests)
There was a problem hiding this comment.
Having the same code in 4 locations only makes sense if it is expected to diverge again later. Over-eager de-duplication can result in more complex code in such cases.
I don't think that's the case here. But I also agree with @jonasschnelli that refactoring is not required in a PR that adds a test.
5d5ada9 to
7632cf6
Compare
|
utACK 7632cf6. Runs for 4 secs, so should be ok to run every time. |
|
utACK jonasschnelli@7632cf6 |
This will test mempools tx eviction (
-maxmempool) together with the new conflict handling (#7105)