Header inconsistency after invalidate/reconsider block #26245

issue fanquake openend this issue on October 4, 2022
  1. fanquake commented at 12:59 pm on October 4, 2022: member

    Demonstration using regtest.

    0# getblockchaininfo
    1  "chain": "regtest",
    2  "blocks": 0,
    3  "headers": 0,
    

    Mine a block

    0# getblockchaininfo
    1  "chain": "regtest",
    2  "blocks": 1,
    3  "headers": 1,
    

    Call invalidateblock

     0# getblockchaininfo
     1  "chain": "regtest",
     2  "blocks": 0,
     3  "headers": 0,
     4# getchaintips
     5    "height": 1,
     6    "hash": "06702ef73c7d8629294f8b6386646f888d60979932ba2ee45e3495d8f25006b5",
     7    "branchlen": 1,
     8    "status": "invalid"
     9  },
    10  {
    11    "height": 0,
    12    "hash": "0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206",
    13    "branchlen": 0,
    14    "status": "active"
    

    Call reconsiderblock

    0# getchaintips
    1    "height": 1,
    2    "hash": "06702ef73c7d8629294f8b6386646f888d60979932ba2ee45e3495d8f25006b5",
    3    "branchlen": 0,
    4    "status": "active"
    

    Header count returned by getblockchaininfo is now < # of blocks.

    0# getblockchaininfo
    1  "chain": "regtest",
    2  "blocks": 1,
    3  "headers": 0,
    
  2. fanquake added the label Bug on Oct 4, 2022
  3. MarcoFalke added the label Validation on Oct 4, 2022
  4. MarcoFalke commented at 1:05 pm on October 4, 2022: member
    Is this a regression?
  5. fanquake commented at 1:54 pm on October 4, 2022: member

    Is this a regression?

    Can recreate the same behaviour with builds of 23.x and 22.x.


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-01 10:13 UTC

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