[Chronik] Automatically fix MINT VAULT txs
Summary:
This is part of the DB upgrade to version 13.
It seems that at this moment of time, this only upgrades a single tx, 47f663238196a8376dffeb867727b7794f1a86e97d7401dd141ac8c072f91c54. However, if someone is updating the DB at a later stage, this code will handle this gracefully (and there seems indication that more txs of this form will come in the future).
Note that this uses the (erroneously added) indexing of OP_RETURN scripts, which actually will be removed as part of D16941. This way the upgrade is basically instant (instead of requiring a full search through all txs, or requiring the LOKAD ID index to be enabled).
Test Plan:
- Make a backup of the Chronik DB
- Search for "UPGRADE13", apply the changes
- Build using ninja
- Run node, it should upgrade automatically to 13, and should print "Upgrading SLP MINT VAULT with TxId " for 47f663238196a8376dffeb867727b7794f1a86e97d7401dd141ac8c072f91c54 and 4c0f26fb3ceef96c56b7797386412e8b1a2d6155f18c146e8fd388b80efbab29, followed by "Upgrading, writing 1 entries for the token DB fix"
- (optional) Restore the previous Chronik DB and unapply the UPGRADE13 changes
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D16936