blkchain
blkchain copied to clipboard
The field `txins.prevout_tx_id` can be NULL, and when it does, it breaks data consistency and. validity
On a fully synchronized database
bitcoin=> select count(*) from txins where txins.prevout_tx_id is null;
count
--------
900937
(1 row)
This is deeply concerning as it is not clear how it happens and it basically breaks the internal consistency of the database. It seems to happen preferentially for transactions having a huge number of inputs.
Trying to gather more infos if possible.
@drake-mer might those be coinbase transactions?
https://github.com/blkchain/blkchain/blob/master/db/postgres.go#L1192C46-L1192C53