HomePhabricator

[Chronik] Fix: `tx_writer.insert` in `handle_block_disconnected`

Description

[Chronik] Fix: tx_writer.insert in handle_block_disconnected

Summary:
chronik_tx didn't include a test for when a block gets removed. This allowed an undetected oversight to slip in: When disconnecting a block, instead of removing txs from the tx index, we would add them.

This fixes it and adds a test to handle this case.

Test Plan: ninja && ./test/functional/test_runner.py chronik_tx

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Mar 28 2023, 13:32
tobias_ruckPushed on Mar 28 2023, 21:57
Reviewer
Restricted Project
Differential Revision
D13488: [Chronik] Fix: `tx_writer.insert` in `handle_block_disconnected`
Parents
rABC8039ccfa0512: [depends] Don't build shared libs in native protobuf
Branches
Unknown
Tags
Unknown