set timeout to 30s for synchronous operations

This commit is contained in:
ThomasV 2016-03-20 13:25:24 +01:00
parent 67145e053b
commit 753a28b452
2 changed files with 3 additions and 3 deletions

View File

@ -231,7 +231,7 @@ class Commands:
return tx.deserialize()
@command('n')
def broadcast(self, tx, timeout=10):
def broadcast(self, tx, timeout=30):
"""Broadcast a transaction to the network. """
return self.network.broadcast(tx, timeout)

View File

@ -821,7 +821,7 @@ class Network(util.DaemonThread):
def get_local_height(self):
return self.blockchain.height()
def synchronous_get(self, request, timeout=100000000):
def synchronous_get(self, request, timeout=30):
queue = Queue.Queue()
self.send([request], queue.put)
try:
@ -832,7 +832,7 @@ class Network(util.DaemonThread):
raise BaseException(r.get('error'))
return r.get('result')
def broadcast(self, tx, timeout=10):
def broadcast(self, tx, timeout=30):
tx_hash = tx.hash()
try:
out = self.synchronous_get(('blockchain.transaction.broadcast', [str(tx)]), timeout)