"Can't read block from disk" when getblock w/ only header known? #9074

issue laanwj opened this issue on November 3, 2016
  1. laanwj commented at 2:44 PM on November 3, 2016: member
    $ cli getblock 00000000000000000254ed1e8143f0bcd3c3564db07e7c35631e999d53e81fa7 false
    error code: -32603
    error message:
    Can't read block from disk
    

    In debug.log, it shows that there is no block position on disk:

    2016-11-03 14:41:01 ERROR: ReadBlockFromDisk: OpenBlockFile failed for CBlockDiskPos(nFile=-1, nPos=0)
    

    Getblockheader works:

    {
      "hash": "00000000000000000254ed1e8143f0bcd3c3564db07e7c35631e999d53e81fa7",
      "confirmations": -1,
      "height": 422059,
      ...
    }
    

    Apparently my client never downloaded the full block (which makes sense, as it is stale). I guess a check needs to be added and the error message changed into something more appropriate.

  2. laanwj added the label RPC/REST/ZMQ on Nov 3, 2016
  3. laanwj closed this on Nov 22, 2019

  4. DrahtBot locked this on Dec 16, 2021
Contributors

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-13 15:15 UTC

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