Skip to content

Comments

Potentially fix sync bug#607

Open
Duddino wants to merge 2 commits intoPIVX-Labs:masterfrom
Duddino:potentially-fix-syncbg
Open

Potentially fix sync bug#607
Duddino wants to merge 2 commits intoPIVX-Labs:masterfrom
Duddino:potentially-fix-syncbg

Conversation

@Duddino
Copy link
Member

@Duddino Duddino commented Oct 27, 2025

Abstract

There has been a report of MPW reporting an incorrect balance and having transaction fail.
This user had a substantial amount of PIVs in cold stake, resyncing the wallet seems to correct the issue. While we weren't able to confirm what happened, here is a potential reason:

  • MPW received a stake reward, just as the user was syncing/had the wallet open
  • A better chain was found, and the node forked and picked up the new one
  • MPW never realizes this and keeps the non existant reward, leading to an incorrect balance and unable to make transactions.

To fix this, MPW will simply not save a transaction to the database if it's too young (Configurable via chain_params)

Testing

  • Test that MPW syncs as usual without issues

@Duddino Duddino self-assigned this Oct 27, 2025
@Duddino Duddino added the Bug This is either a bugfix (PR) or a bug (issue). label Oct 27, 2025
@netlify
Copy link

netlify bot commented Oct 27, 2025

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit cab7e3d
🔍 Latest deploy log https://app.netlify.com/projects/cheery-moxie-4f1121/deploys/6912269f077c080008cdc214
😎 Deploy Preview https://deploy-preview-607--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@JSKitty JSKitty left a comment

Choose a reason for hiding this comment

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

Several issues:

  • I see no confirmsForSaving param anywhere in our chainparams.
  • Due to the above, Sent TXs are not persisting to IndexedDB, so if you immediately refresh, the Tx will be gone (until synced back via explorer).
  • When sending a Tx, the "Time" is using Unix(0), thus displaying as "1 Jan 70".
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug This is either a bugfix (PR) or a bug (issue).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants