tupdate broadcast command, with timeout - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9cd4acafccc914a913582cf6aff91d4bc8264ba3 DIR parent 34a4df1114216b57e74a33c8653ef086088e7b47 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 25 Feb 2016 10:55:37 +0100 update broadcast command, with timeout Diffstat: M lib/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -230,10 +230,10 @@ class Commands: return Transaction(tx).deserialize() @command('n') - def broadcast(self, tx): + def broadcast(self, tx, timeout=10): """Broadcast a transaction to the network. """ t = Transaction(tx) - return self.network.synchronous_get(('blockchain.transaction.broadcast', [str(t)])) + return self.network.broadcast(str(t), timeout) @command('') def createmultisig(self, num, pubkeys): t@@ -655,6 +655,7 @@ command_options = { 'account': (None, "--account", "Account"), 'memo': ("-m", "--memo", "Description of the request"), '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."), 'pending': (None, "--pending", "Show only pending requests."), 'expired': (None, "--expired", "Show only expired requests."),