Allow sending transactions with relaying disabled

This commit is contained in:
Michał Sałaban 2018-01-31 00:21:53 +01:00
parent c073a9d1a3
commit 323746b80a
2 changed files with 5 additions and 3 deletions

View file

@ -27,10 +27,10 @@ class JSONRPCDaemon(object):
info = self.raw_jsonrpc_request('get_info')
return info
def send_transaction(self, blob):
def send_transaction(self, blob, relay=True):
res = self.raw_request('/sendrawtransaction', {
'tx_as_hex': blob,
'do_not_relay': False})
'do_not_relay': not relay})
if res['status'] == 'OK':
return res
raise exceptions.TransactionBroadcastError(