Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Error when there are unconfirmed transactions in the rivine balance check #178

Closed
robvanmieghem opened this issue Oct 5, 2018 · 0 comments

Comments

@robvanmieghem
Copy link

Currently this gives:

In [12]: wallet1.current_balance
---------------------------------------------------------------------------
RESTAPIError                              Traceback (most recent call last)
/opt/code/github/threefoldtech/jumpscale_core/cmds/js_shell in <module>()
----> 1 wallet1.current_balance

/opt/code/github/threefoldtech/jumpscale_lib/JumpscaleLib/clients/blockchain/rivine/RivineWallet.py in current_balance(self)
     95         Retrieves current wallet balance
     96         """
---> 97         self._check_balance()
     98         wb = WalletBalance()
     99         for id, output in self._unspent_coins_outputs.items():

/opt/code/github/threefoldtech/jumpscale_lib/JumpscaleLib/clients/blockchain/rivine/RivineWallet.py in _check_balance(self)
    179         """
    180         current_chain_height = self._get_current_chain_height()
--> 181         unconfirmed_txs = self._get_unconfirmed_transactions(format_inputs=True)
    182         logger.info('Current chain height is: {}'.format(current_chain_height))
    183         # when checking the balance we will check for 10 more addresses

/opt/code/github/threefoldtech/jumpscale_lib/JumpscaleLib/clients/blockchain/rivine/RivineWallet.py in _get_unconfirmed_transactions(self, format_inputs)
    301             'minerfees': ['100000000']}}]}
    302         """
--> 303         return utils.get_unconfirmed_transactions(self._bc_networks, format_inputs=format_inputs)
    304
    305

/opt/code/github/threefoldtech/jumpscale_lib/JumpscaleLib/clients/blockchain/rivine/utils.py in get_unconfirmed_transactions(rivine_explorer_addresses, format_inputs)
    188     if result:
    189         if response:
--> 190             raise RESTAPIError('{} {}'.format(msg, response.text))
    191         else:
    192             raise RESTAPIError(msg)

RESTAPIError: Failed to retrieve unconfirmed transactions. {"transactions":[{"version":1,"data":{"coininputs":[{"parentid":"0d3cfc3147814403bfe1ada54a591f09d66e3bd3f1a9735861dd7e340f13a588","fulfillment":{"type":1,"data":{"publickey":"ed25519:07f351a746eef17a4278b49a80ba60c3123dd75063a6f79906b8f301e65d73af","signature":"107b00447a0a49a3032749f81bd9e500ad5a9688c152a7eca23fd76da7fb010438507a9caf5a31b5bc4c471da0deec7bdc7efcd41682c460bc8e4c7f2b75bd07"}}}],"coinoutputs":[{"value":"1000000000000","condition":{"type":1,"data":{"unlockhash":"01ffffbd36a9d6c995a82c8e34d53cf9cbb13b2c55bed3fcc0020d9c0ff682cd8d45d2f41acbeb"}}},{"value":"8999900000000","condition":{"type":1,"data":{"unlockhash":"013b9a9b9cf741e9e0f477ca237fccaed35934ad003f10ed07821ec9a076f48e3460bfad1dd26b"}}}],"minerfees":["100000000"]}}]}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants