Fix Wrong Wallet Balance¶
If you are staking and "you hit a stake," then the UTXO which hit the stake will become immature for a 101 confirmations, and the BLOCK in that UTXO will not be included in your Available Balance while it is immature. However, that UTXO will still be part of your Total Balance. Also, if you are using the BlockDX to sell BLOCK from your Blocknet wallet, the BLOCK balance in your wallet can temporarily drop by more than the amount of BLOCK you are selling. This can happen if your wallet's smallest available UTXO is larger than the amount of BLOCK you are selling in the transaction.
In both of the cases mentioned above, your total available balance will automatically return to the expected value after a short time. However, for various reasons, the Blocknet Wallet can occasionally display the wrong balance for an extended time, in which case you'll need to Recover Transactions from the blockchain before it will display the correct balance. You can confirm if your wallet needs a Recover Transactions operation as follows:
Select Window->Coin Control to display the addresses (and UTXOs) where funds are stored in your wallet:
This will display a screen like this (in Tree mode):
Note: If using the Command Line Interface (CLI) to the wallet, you can get the same information as above by issuing the
listunspentcommand from the directory where your
blocknet-cliprogram is stored, like this:You can also issue
listunspentfrom Tools->Debug Console in the GUI/Qt wallet.
Use the Blocknet Explorer to explore the addresses displayed under Coin Control.
- The total BLOCK available at each address as displayed in Coin
listunspent) should match the total BLOCK available at each address as displayed by the Blocknet Explorer. If they don't match, you can sync your wallet address balances with the blockchain as described below in Recover Transactions:
There are several options to Recover Transactions and sync you wallet balance with the blockchain:
Option 1: From the GUI/Qt interface¶
From the GUI/Qt interface
From the GUI/Qt wallet, select Tools->Wallet Repair->Recover Transactions(Drop metadata): This will cause your wallet to close and restart.
Bug: Sometimes, especially if it takes a long time for your wallet to close, this operation attempts to restart the wallet too quickly - before it has shutdown completely, then it displays a message saying: Can't obtain a lock on data directory.... More...
If you get this error, simply restart the wallet and try once again to perform Tools->Wallet Repair->Recover Transactions(Drop metadata). If it happens a second time, try a third time.
Option 2: Add
blocknet.conf file, then restart wallet.¶
blocknet.conf file, then restart wallet.
This option can be used with either GUI/Qt wallet or CLI wallet.
The easiest way to edit your
blocknet.conf file is as follows:
Select Settings->Options (Windows) or Blocknet->Preferences (Mac):
Click Open Configuration File:
Click OK to dismiss the warning:
This will open the
blocknet.conf file in your default editor.
An alternate way to edit your
blocknet.conf file is to locate it
in your Blocknet data directory, right-click (trackpad two-finger
click) on the file, select Open With, then open it with a simple
(e.g. NotePad on Windows, TextEdit on Mac). If
does not exist in your data directory, create it there with the
text editor. The data directory is found as follows:
%appdata%\Blocknet\into the File Explorer path field.
Open Finder and in the Go menu select Go to Folder... and enter the above path.
Once you have your
blocknet.conf file open in an editor, simply
add the following line to the file:
Then save the file and restart your Blocknet wallet.
After your Blocknet wallet has finished syncing, remove the
zapwallettxes=2 line from your
blocknet.conf and save the file
again. This will prevent your wallet from recovering all transactions
from the blockchain every time you open it.
Option 3: Open Blocknet wallet with the parameter,
Open Blocknet wallet with the parameter,
This option can be used if you are starting the Blocknet wallet
from the command line and passing a parameter. Close your
Blocknet wallet, then open it from the directory where
blocknetd is located, like this: