[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:
- ninja && ./test/functional/test_runner.py chronik_block
- 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