chainlib-eth

Ethereum implementation of the chainlib interface
Info | Log | Files | Refs | README | LICENSE

openethereum.py (486B)


      1 # standard imports
      2 import logging
      3 
      4 # local imports
      5 from chainlib.eth.dialect import DefaultErrorParser
      6 from chainlib.error import RPCNonceException
      7 
      8 logg = logging.getLogger(__name__)
      9 
     10 
     11 class DialectErrorParser(DefaultErrorParser):
     12 
     13     def translate(self, error):
     14         if error['error']['code'] == -32010:
     15             if 'nonce is too low' in error['error']['message']:
     16                 return RPCNonceException(error)
     17         return super(DialectErrorParser, self).translate(error)