Extend #7956 with one more test. #7992

pull TheBlueMatt wants to merge 3 commits into bitcoin:master from TheBlueMatt:16-5-7956-update changing 2 files +122 −1
  1. TheBlueMatt commented at 12:56 AM on May 3, 2016: contributor

    No description provided.

  2. chain: Add assertion in case of missing records in index db 84c13e759d
  3. test: Add more thorough test for dbwrapper iterators
    I made a silly mistake in a database wrapper where keys
    were sorted by char instead of uint8_t. As x86 char is signed
    the sorting for the block index database was messed up, resulting
    in a segfault due to missing records.
    
    Add a test to catch:
    - Wrong sorting
    - Seeking errors
    - Iteration result not complete
    6030625631
  4. laanwj added the label Tests on May 3, 2016
  5. laanwj commented at 10:48 AM on May 3, 2016: member

    Thanks! (continues #7956)

  6. laanwj cross-referenced this on May 3, 2016 from issue test: Add more thorough test for dbwrapper iterators by laanwj
  7. in src/test/dbwrapper_tests.cpp:None in 7be47549f6 outdated
     255 | +
     256 | +    template <typename Stream, typename Operation>
     257 | +    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
     258 | +        if (ser_action.ForRead()) {
     259 | +            str.clear();
     260 | +            char c;
    


    paveljanik commented at 6:14 PM on May 3, 2016:

    Please initialize this (as clang said 8):

    char c = '\0';
    

    TheBlueMatt commented at 2:45 AM on May 18, 2016:

    Fixed.

  8. paveljanik commented at 6:15 PM on May 3, 2016: contributor

    Concept ACK

  9. Add test for dbwrapper iterators with same-prefix keys. 269a4402a8
  10. TheBlueMatt force-pushed on May 18, 2016
  11. sipa cross-referenced this on May 26, 2016 from issue Addrman offline attempts by gmaxwell
  12. sipa merged this on Jun 2, 2016
  13. sipa closed this on Jun 2, 2016

  14. sipa referenced this in commit ec45cc5e27 on Jun 2, 2016
  15. MarcoFalke referenced this in commit 658307e835 on Jun 9, 2016
  16. nomnombtc referenced this in commit e50b833d01 on Nov 12, 2016
  17. nomnombtc referenced this in commit 3880957500 on Nov 12, 2016
  18. nomnombtc referenced this in commit 99cfc5957d on Nov 13, 2016
  19. sickpig referenced this in commit 5f8ab86255 on Nov 14, 2016
  20. str4d cross-referenced this on Apr 4, 2018 from issue Additional dbwrapper tests by str4d
  21. zkbot referenced this in commit 564a229927 on Apr 4, 2018
  22. zkbot referenced this in commit dc57d6a7bc on Apr 4, 2018
  23. furszy cross-referenced this on Apr 13, 2021 from issue [Test] Expand dbwrapper unit test coverage by furszy
  24. random-zebra referenced this in commit d1210fa46e on Apr 23, 2021
  25. bitcoin locked this on Sep 8, 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-05-19 06:55 UTC