update broadcast command, with timeout
This commit is contained in:
@@ -230,10 +230,10 @@ class Commands:
|
|||||||
return Transaction(tx).deserialize()
|
return Transaction(tx).deserialize()
|
||||||
|
|
||||||
@command('n')
|
@command('n')
|
||||||
def broadcast(self, tx):
|
def broadcast(self, tx, timeout=10):
|
||||||
"""Broadcast a transaction to the network. """
|
"""Broadcast a transaction to the network. """
|
||||||
t = Transaction(tx)
|
t = Transaction(tx)
|
||||||
return self.network.synchronous_get(('blockchain.transaction.broadcast', [str(t)]))
|
return self.network.broadcast(str(t), timeout)
|
||||||
|
|
||||||
@command('')
|
@command('')
|
||||||
def createmultisig(self, num, pubkeys):
|
def createmultisig(self, num, pubkeys):
|
||||||
@@ -655,6 +655,7 @@ command_options = {
|
|||||||
'account': (None, "--account", "Account"),
|
'account': (None, "--account", "Account"),
|
||||||
'memo': ("-m", "--memo", "Description of the request"),
|
'memo': ("-m", "--memo", "Description of the request"),
|
||||||
'expiration': (None, "--expiration", "Time in seconds"),
|
'expiration': (None, "--expiration", "Time in seconds"),
|
||||||
|
'timeout': (None, "--timeout", "Timeout in seconds"),
|
||||||
'force': (None, "--force", "Create new address beyong gap limit, if no more address is available."),
|
'force': (None, "--force", "Create new address beyong gap limit, if no more address is available."),
|
||||||
'pending': (None, "--pending", "Show only pending requests."),
|
'pending': (None, "--pending", "Show only pending requests."),
|
||||||
'expired': (None, "--expired", "Show only expired requests."),
|
'expired': (None, "--expired", "Show only expired requests."),
|
||||||
|
|||||||
Reference in New Issue
Block a user