bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.83k stars 2.08k forks source link

[Bitcore-Node] Fix Unspent Coins with spentTxid #3507

Closed escottalexander closed 1 year ago

escottalexander commented 1 year ago

This PR adds a new migration script that checks all unspent coins that have a spentTxid and sets the spentTxid to an empty string. It also checks to verify that the coin is unspent before updating.

This script is mostly a copy of the original (now renamed) migration script.

Location of changes are:

Also updated the original migration script to match a uniform naming scheme for the migration scripts and to set the spentTxid when it updates a record. This would be useful to anyone who runs the script in the future though unnecessary if the second migration script is used.

u353y commented 11 months ago
Details

Trezor