dogecoin/dogecoin

Incorrect balance reported

Open

#1,742 opened on Feb 17, 2021

View on GitHub
 (3 comments) (0 reactions) (0 assignees)C++ (2,776 forks)batch import
help wanted

Repository metrics

Stars
 (14,348 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Describe the issue

My wallet is reporting a difference balance from getbalance "*" 0 than the sum of outputs from listunspent 0. Is there a way to fix this? I've tried a -rescan already

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. dogecoin-cli getbalance "*" 0
  2. dogecoin-cli listunspent 0

Expected behaviour

Sum of unspent coins should equal balance

Actual behaviour

Sum of unspent coins does not equal balance

Screenshots.

$ dogecoin-cli getbalance "*" 0
24453.88515774
$ dogecoin-cli getbalance "*" 1
270.47647975
$ dogecoin-cli getbalance "*" 1
270.47647975
$ dogecoin-cli getbalance
261.49099631
$ dogecoin-cli getbalance "*" 1
270.47647975
$ dogecoin-cli getbalance "" 1
270.47647975
$ dogecoin-cli getbalance "*" 1
270.47647975
$ dogecoin-cli listaccounts
{
  "": 270.47647975
}
$ dogecoin-cli listaccounts 0
{
  "": 24453.88515774
}
$ dogecoin-cli listaccounts 0
{
  "": 24453.88515774
}
$ dogecoin-cli listunspent 0
[
  {
    "txid": "5d864082084584389170e4eaa74d5d705dc069c4d89661521bb0ebd561e50022",
    "vout": 0,
    "address": "DLhcEsW6csPNyr9iFXApF14jx2saaJJbia",
    "scriptPubKey": "76a914aaaffd72dc06141fa4a54f9f27c3fd9030b7a29488ac",
    "amount": 2.16890144,
    "confirmations": 505,
    "spendable": true,
    "solvable": true
  },
  {
    "txid": "ee96f713163c894fddf8b54ef9a867b5c9e68979f3e50c2a5d8c23792ee6405c",
    "vout": 1,
    "address": "DSbMX2jLkC7EnBMFo68v7t19XwtiksfsXu",
    "scriptPubKey": "76a914eb51f5cd5552c0e76c1410b25e112573bd65498a88ac",
    "amount": 212.71371800,
    "confirmations": 64,
    "spendable": true,
    "solvable": true
  },
  {
    "txid": "0e9c8348499a07bab18595439933e295281d1f276da2520f21852ce4b7c5ef76",
    "vout": 0,
    "address": "D942TNEFby9nJ698gtBnG37oBWMEhwYR4S",
    "scriptPubKey": "76a9142aeb038e72eb8ea1443bcd347d2e818c8eca7e4688ac",
    "amount": 11.41049374,
    "confirmations": 571,
    "spendable": true,
    "solvable": true
  },
  {
    "txid": "0dee832a7573ab376b6dafaf3377cb9e990dd1592c2464932e0811acedcdd18f",
    "vout": 0,
    "address": "DLG4g6KhwzYQPCUAWK1qvHKVKED6gAnutc",
    "scriptPubKey": "76a914a5db3de1b49cc9d5b8a642c8714c9782c75ee2df88ac",
    "amount": 4.78407713,
    "confirmations": 69,
    "spendable": true,
    "solvable": true
  },
  {
    "txid": "c2db41162f885b2c8bafea4805fa042f5f09bf14d4c5df2ffc86e4e799b5d1dd",
    "vout": 0,
    "address": "D5v6F4CKiG6WkuYafd2YK2d3HwFS1VFoGy",
    "scriptPubKey": "76a9140882787f7a362d93922dda6c91ed2fb989fe22ca88ac",
    "amount": 30.41380600,
    "confirmations": 224,
    "spendable": true,
    "solvable": true
  }
]

What version of Dogecoin Core are you using?

Dogecoin Core RPC client version v1.14.2

Machine specs:

Ubuntu 18.04.2 LTS

Contributor guide