HomePhabricator

[Chronik] Fix: Indexed block size is 0 when running `-chronikindex`

Description

[Chronik] Fix: Indexed block size is 0 when running -chronikindex

Summary:
During -chronikreindex, CBlockIndex::nSize seems to be 0, and the wrong value is indexed for the block size.

This should potentially be fixed downstream (by setting nSize correctly before running the -chronikreindex loop), but for now, using ::GetSerializeSize fixes the bug.

Test Plan:

  1. ninja && ./test/functional/test_runner.py chronik_block
  2. Use nSize in chronik_bridge.cpp instead of GetSerializeSize, now chronik_block.py should fail.

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D13981

Details

Provenance
tobias_ruckAuthored on Jun 4 2023, 19:07
tobias_ruckPushed on Jun 5 2023, 11:08
Reviewer
Restricted Project
Differential Revision
D13981: [Chronik] Fix: Indexed block size is 0 when running `-chronikindex`
Parents
rABC5320339fbc44: build, refactor: Improve package version usage
Branches
Unknown
Tags
Unknown