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 0:56 am on May 3, 2016: member
  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. in src/test/dbwrapper_tests.cpp: 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):

    0char c = '\0';
    

    TheBlueMatt commented at 2:45 am on May 18, 2016:
    Fixed.
  7. paveljanik commented at 6:15 pm on May 3, 2016: contributor
    Concept ACK
  8. Add test for dbwrapper iterators with same-prefix keys. 269a4402a8
  9. TheBlueMatt force-pushed on May 18, 2016
  10. sipa merged this on Jun 2, 2016
  11. sipa closed this on Jun 2, 2016

  12. sipa referenced this in commit ec45cc5e27 on Jun 2, 2016
  13. MarcoFalke referenced this in commit 658307e835 on Jun 9, 2016
  14. nomnombtc referenced this in commit e50b833d01 on Nov 12, 2016
  15. nomnombtc referenced this in commit 3880957500 on Nov 12, 2016
  16. nomnombtc referenced this in commit 99cfc5957d on Nov 13, 2016
  17. sickpig referenced this in commit 5f8ab86255 on Nov 14, 2016
  18. zkbot referenced this in commit 564a229927 on Apr 4, 2018
  19. zkbot referenced this in commit dc57d6a7bc on Apr 4, 2018
  20. random-zebra referenced this in commit d1210fa46e on Apr 23, 2021
  21. MarcoFalke 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: 2024-07-03 19:12 UTC

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