pocketnetteam / pocketnet.core

Decentralized social network based on the blockchain
https://pocketnet.app
Apache License 2.0
115 stars 28 forks source link

"sql_balance" and Block Explorer wallet ballance differ after "spending" inputs #550

Closed americanpatriotdave closed 1 year ago

americanpatriotdave commented 1 year ago

pocketcoin-cli getwalletinfo produces the "sql_balance" the blockexplorer (BE) produces "Final Balance"

After working to reduce the "Available coins count" by sending my PKOIN back to my wallet, I found that the BE Final Balance is more than 4000 PKOIN less than the "sql_balance"

I managed to locate a wallet address that somehow contains the approximate (not exactly) difference between the "sql_balance" and the BE "Final Balance."

The command I used to send was: pocketcoin-cli sendtoaddress MypoCKETCoinAddRess 5000

I did this as many times as was necessary to reduce the Available Coins Count and only performed additional transactions after the previous received 100 confirmations.

After doing an audit of my wallet balances, I noticed the discrepancy.

When I have done this in the past on v0.20.29, there was never an issue. This appears to be a new issue in v0.21.1

The node build I'm using is debian.

Which balance is correct? sql_balance or BE ?

americanpatriotdave commented 1 year ago

Hello? Can anybody assist? I am a node operator and hoping someone can help to retrieve/unlock the PKOIN that is unavailable in the node's wallet.

Thanks!

andyoknen commented 1 year ago

Are there any transactions in the command output listpotencialabandontransactions ?

americanpatriotdave commented 1 year ago

There are nine transactions in the output. None of them show up in the block explorer.

andyoknen commented 1 year ago

Okay, these are the consequences of the problem that existed in 0.20.29. Now do it for each transaction:

abandontransaction "txid"

americanpatriotdave commented 1 year ago

That did the trick!! The "balance" and the "sql_balance" are now equal. Thank you for your help. This case is resolved.