test: add missing comparison of node1’s mempool in MempoolPackagesTest #29948

pull Umiiii wants to merge 1 commits into bitcoin:master from Umiiii:master changing 1 files +15 −11
  1. Umiiii commented at 1:54 am on April 24, 2024: contributor

    #29941 Recreated a pull request because there was a conflict. Trying to resolve the conflict but the old one automatically closed.

    Add missing comparison for TODO comments in mempool_packages.py

    Also, notice that the ancestor size limits and descendant size limits actually implemented in #21800 , so I removed the todo for those two size limits.

  2. test: add missing comparison of node1's mempool in MempoolPackagesTest e912717ff6
  3. DrahtBot commented at 1:54 am on April 24, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK alfonsoromanz, kevkevinpal, rkrux, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28676 ([WIP] Cluster mempool implementation by sdaftuar)

    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.

  4. DrahtBot added the label Tests on Apr 24, 2024
  5. alfonsoromanz approved
  6. alfonsoromanz commented at 1:16 pm on April 25, 2024: contributor
    Tested ACK e912717ff63f111d8f1cd7ed1fcf054e28f36409. The code looks good to me and the test execution is successful.
  7. kevkevinpal commented at 1:31 pm on April 26, 2024: contributor

    ACK e912717

    looks good to me

  8. Umiiii commented at 5:36 am on April 27, 2024: contributor
    Hello everyone, Could you please confirm if it is ready for merging, or does it require further reviews?
  9. fjahr commented at 12:17 pm on April 27, 2024: contributor

    @Umiiii I am not sure why you are asking me because I am not familiar with this change yet. I’m sure a maintainer will take a look at this change soon. You need to have a bit of patience though, there are a lot of open PRs and Issues and this being open for 3 days is not a very long time. And in general, more review is always better, 3 ACKs is the rule of thumb for simple but non-trivial changes.

    And please remove the @ mentions in your commit message. The commit message is merged with the change and that leads to a lot of unnecessary notifications for those that are tagged.

  10. in test/functional/mempool_packages.py:203 in e912717ff6
    205-        for tx in mempool:
    206-            assert_equal(mempool[tx]['unbroadcast'], False)
    207-
    208-        # TODO: test ancestor size limits
    209+            entry0 = self.nodes[0].getmempoolentry(tx)
    210+            entry1 = self.nodes[1].getmempoolentry(tx)
    


    rkrux commented at 10:39 am on May 10, 2024:
    With this, isn’t the check on line 201 redundant now?

    Umiiii commented at 10:51 am on May 10, 2024:
    mempool1 only stores string(txid), while getmempoolentry contains more information that we need to check, so no, it is not redundant. Also see: https://developer.bitcoin.org/reference/rpc/getmempoolentry.html

    rkrux commented at 11:20 am on May 10, 2024:
    Hmm so not redundant keeping in mind that testing getrawmempool is also needed, got it.
  11. in test/functional/mempool_packages.py:256 in e912717ff6
    250@@ -251,10 +251,14 @@ def run_test(self):
    251             assert tx in mempool1
    252         for tx in chain[CUSTOM_DESCENDANT_LIMIT:]:
    253             assert tx not in mempool1
    254-        # TODO: more detailed check of node1's mempool (fees etc.)
    255-
    256-        # TODO: test descendant size limits
    


    rkrux commented at 10:39 am on May 10, 2024:
    Where is this done? Can you share link?

    Umiiii commented at 10:47 am on May 10, 2024:

    rkrux commented at 11:17 am on May 10, 2024:
    You mean in mempool_package_limits?
  12. in test/functional/mempool_packages.py:261 in e912717ff6
    260+            entry1 = self.nodes[1].getmempoolentry(tx)
    261+            assert not entry0['unbroadcast']
    262+            assert not entry1['unbroadcast']
    263+            assert_equal(entry1['fees']['base'], entry0['fees']['base'])
    264+            assert_equal(entry1['vsize'], entry0['vsize'])
    265+            assert_equal(entry1['depends'], entry0['depends'])
    


    rkrux commented at 10:41 am on May 10, 2024:
    Nit: This portion is copy-paste of the above block, can be extracted in a function compareMempoolsEntry(entry0, entry1)

    Umiiii commented at 10:58 am on May 10, 2024:
    That’s on purpose, just to align with the existing coding style within this file (and other testing code). Those unit tests don’t actually introduce new functions while comparing two entries (and the entries’ variables).
  13. rkrux commented at 10:43 am on May 10, 2024: none

    tACK e912717

    Make successful, all functional tests pass. Left couple suggestions. Also for some reason checking out this PR using this method doesn’t work, I had to checkout this particular commit instead. Is it because the forked repo’s branch is also called master? https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

  14. rkrux approved
  15. rkrux commented at 11:21 am on May 10, 2024: none
    Thanks for quick responses.
  16. achow101 commented at 4:15 pm on May 10, 2024: member
    ACK e912717ff63f111d8f1cd7ed1fcf054e28f36409
  17. achow101 merged this on May 10, 2024
  18. achow101 closed this on May 10, 2024


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-28 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me