Closed bonomat closed 5 years ago
Currently, we just hold on to the initial request that triggers the scan. bitcoind provides a way of checking for the status of the scan and later extract the result, however we don't know how to do that exactly. Check bitcoind documentation.
I could not find the mentioned option. One can start
the request and later get the status
, however, this does not resolve our timeout issue. The initial call still needs to run and wait for the results.
e.g.:
bitcoin-cli -testnet scantxoutset start '[{"desc":"combo(tpubD91aWShJqtFfoq76ngAtuVzSenQRUc3QEsfKHwxvTHtKQUtB7B3DwXthq6F2SGvmQNu3oWB9zxp1M4h8jsLxKc8pfpQASTQ9k6Sg3uiFpro)", "range":100}]' &
[1] 23775
bitcoin-cli -testnet scantxoutset status '[{"desc":"combo(tpubD91aWShJqtFfoq76ngAtuVzSenQRUc3QEsfKHwxvTHtKQUtB7B3DwXthq6F2SGvmQNu3oWB9zxp1M4h8jsLxKc8pfpQASTQ9k6Sg3uiFpro)", "range":100}]' &
{
"progress": 35
}
...
{
"success": true,
"searched_items": 22485662,
"unspents": [
],
"total_amount": 0.00000000
}
It looks like we can't configure the timeout atm. Could be worth ditching the library we are using because it doesn't add much value.
This was wrong, we can indeed change the timeout for the client.
Just update the timeout to a higher one, default is 30 seconds.
I could not find the mentioned option. One can
start
the request and later get thestatus
, however, this does not resolve our timeout issue. The initial call still needs to run and wait for the results.
You found the mentioned option, it's the status
.
We should investigate why updating the UTXO set times out randomly.
#033[39mFailed to refresh UTXO: ESOCKETTIMEDOUT"
related to these lines: https://github.com/coblox/bobtimus/blob/af6ff678f9555561e86a9540ae8bd4dcf9d067c1/src/index.ts#L23-L30
and https://github.com/coblox/bobtimus/blob/af6ff678f9555561e86a9540ae8bd4dcf9d067c1/src/wallets/bitcoin.ts#L150-L177
Additional information:
bitcoind
provides a way of checking for the status of the scan and later extract the result, however we don't know how to do that exactly. Check bitcoind documentation.