reservation / balance issues with failed transction
Ran into a scenario on lbry.tv where a user was seeing a different balance between the desktop app. Running utxo release unlocked some of the coins per Account list, but the balance was still incorrect (since it's cached). It only reset once I sent another LBC to the address.
Need to find out why utxos are being reserved even though we are using blocking everywhere (including wallet send which has blocking by default).
Will try to repro.
I had this happen to me even with a --preview transaction.
Ultimate fix: do not reserve funds until they are actually accepted by the wallet server.
This is not fixed, a workaround was only added for restart.
Still getting this, even with blocking calls. Not sure exactly what the scenario is, but I think it's when the tx fails with blocking. I was pretty much running a bunch of stream updates like the one here, and it ended up running out of LBC.
1z [lbry@ytsync6:~] 2s $ /opt/lbry/lbrynet account balance bSPxtmqYXafnGEdAwYk3EYhZ9iv3u75pwD
{
"available": "0.00007985",
"reserved": "108.32196809",
"reserved_subtotals": {
"claims": "0.828",
"supports": "0.0",
"tips": "107.49396809"
},
"total": "108.32204794"
}
1z [lbry@ytsync6:~] $ /opt/lbry/lbrynet stream update --claim_id=6f8e26bebe98c556b6123391e3736f328c316ae7 --claim_address=bD2hUhGBjS6rf2wkdAGdRKbnBBzrnrL1cm --blocking --funding_account_ids=bSPxtmqYXafnGEdAwYk3EYhZ9iv3u75pwD --bid=0.001
{
"code": -32500,
"data": {
"args": [],
"command": "stream_update",
"kwargs": {
"bid": "0.001",
"blocking": true,
"channel_account_id": [],
"claim_address": "bD2hUhGBjS6rf2wkdAGdRKbnBBzrnrL1cm",
"claim_id": "6f8e26bebe98c556b6123391e3736f328c316ae7",
"clear_channel": false,
"clear_fee": false,
"clear_languages": false,
"clear_locations": false,
"clear_tags": false,
"funding_account_ids": [
"bSPxtmqYXafnGEdAwYk3EYhZ9iv3u75pwD"
],
"languages": [],
"locations": [],
"optimize_file": false,
"preview": false,
"replace": false,
"tags": [],
"validate_file": false
},
"name": "InsufficientFundsError",
"traceback": [
"Traceback (most recent call last):",
" File \"lbry/extras/daemon/daemon.py\", line 693, in _process_rpc_call",
" File \"lbry/extras/daemon/daemon.py\", line 3558, in jsonrpc_stream_update",
" File \"lbry/wallet/transaction.py\", line 863, in create",
" File \"lbry/wallet/transaction.py\", line 825, in create",
"lbry.error.InsufficientFundsError: Not enough funds to cover this transaction.",
""
]
},
"message": "Not enough funds to cover this transaction."
}
1z [lbry@ytsync6:~] $ /opt/lbry/lbrynet utxo release
null
1z [lbry@ytsync6:~] 2s $ /opt/lbry/lbrynet account balance bSPxtmqYXafnGEdAwYk3EYhZ9iv3u75pwD
{
"available": "19.24103521",
"reserved": "108.32196809",
"reserved_subtotals": {
"claims": "0.828",
"supports": "0.0",
"tips": "107.49396809"
},
"total": "127.5630033"