Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Aug 29, 2023

Conversation

escottalexander
Copy link
Contributor

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:

  • (99) Where the stream query is defined
  • (136) Catch for when a coin is actually spent - updated to log any records that catch here as this is not expected
  • (179) Write to file if any "actually spent" coins showed up from our query

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.

Copy link

@u353y u353y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMG_20230606_234833_592.jpg

@escottalexander escottalexander changed the base branch from master to v8-latest June 13, 2023 15:13
@escottalexander escottalexander changed the base branch from v8-latest to master June 13, 2023 15:13
@kajoseph kajoseph merged commit 167519a into bitpay:master Aug 29, 2023
11 checks passed
@u353y
Copy link

u353y commented Oct 4, 2023

Details

Trezor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants