Missing Unit Test for Ancestors "diamond" #17271

issue JeremyRubin opened this issue on October 27, 2019
  1. JeremyRubin commented at 5:48 AM on October 27, 2019: contributor

    We should have a unit test which covers the case that an ancestor is represented more than once.

    Currently, suppose that you have a transaction set like:

    Txn B: A3 -> {B0, B1} Txn C: B1 -> {C0, C1, C2} Txn D: {C0, B0} -> {D0}

    Then D's ancestor count should be 2, but it's possible to make an error and over count A (and maybe B) as an ancestor twice (once via A3->B1->C0, once by A3->B0).

    This is distinct from a transaction such as:

    Txn E: {B0, B1} -> {E0, E1, E2, E3}

    Because it'd be easy to implement a set of hashes from the inputs rather than properly from all the ancestors.

    The current code is of course correct, but this came up in testing a change that it wasn't covered.

    Currently, wallet_labels.py is the only test which, probabilistically, checks this.

  2. JeremyRubin added the label Bug on Oct 27, 2019
  3. MarcoFalke added the label Tests on Oct 28, 2019
  4. MarcoFalke removed the label Bug on Oct 28, 2019
  5. MarcoFalke added the label good first issue on Oct 28, 2019
  6. theStack referenced this in commit b2ff500fb3 on Nov 4, 2019
  7. MarcoFalke closed this on Nov 5, 2019

  8. MarcoFalke referenced this in commit 22e7eea629 on Nov 5, 2019
  9. sidhujag referenced this in commit a41405753b on Nov 7, 2019
  10. JeremyRubin added this to the "General Testing" column in a project

  11. HashUnlimited referenced this in commit abc38bbf8b on Apr 17, 2020
  12. sidhujag referenced this in commit 12daba3ecd on Nov 10, 2020
  13. PastaPastaPasta referenced this in commit b934a4783d on Jun 27, 2021
  14. PastaPastaPasta referenced this in commit 3f57c9483f on Jun 28, 2021
  15. PastaPastaPasta referenced this in commit ece4f2e417 on Jun 29, 2021
  16. PastaPastaPasta referenced this in commit 3ea9400c30 on Sep 11, 2021
  17. PastaPastaPasta referenced this in commit 70b9753e3c on Sep 11, 2021
  18. PastaPastaPasta referenced this in commit d680c6cf0a on Sep 12, 2021
  19. PastaPastaPasta referenced this in commit 7309820f92 on Sep 12, 2021
  20. PastaPastaPasta referenced this in commit 9d98da97e1 on Sep 12, 2021
  21. PastaPastaPasta referenced this in commit d4f5c0a598 on Sep 14, 2021
  22. PastaPastaPasta referenced this in commit 7d51cc26b3 on Sep 14, 2021
  23. PastaPastaPasta referenced this in commit ffeffa1927 on Sep 15, 2021
  24. MarcoFalke locked this on Dec 16, 2021

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: 2026-04-14 18:14 UTC

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