def get_transaction(tx): """ It will success every 3 invokes. The return status order is: Exception, Exception, Success, Exception, ... """ global INVOKE_COUNTER INVOKE_COUNTER = INVOKE_COUNTER + 1 if INVOKE_COUNTER % 3 == 0: return "" else: raise_connection_error()
def send_transaction(rawtx): raise_connection_error()
def get_balance(addr): raise_connection_error()
def get_transactions(txid): raise_connection_error()
def get_unspents(addr): raise_connection_error()