1
0

fix some network.get_transaction calls

see #4814 (issuecomment-434392195)
This commit is contained in:
SomberNight
2018-10-30 19:07:37 +01:00
parent f53b480f1c
commit 5b4fada2a0
5 changed files with 26 additions and 24 deletions

View File

@@ -706,7 +706,7 @@ class Network(PrintError):
return await self.interface.session.send_request('blockchain.transaction.get_merkle', [tx_hash, tx_height])
@best_effort_reliable
async def broadcast_transaction(self, tx, timeout=10):
async def broadcast_transaction(self, tx, *, timeout=10):
out = await self.interface.session.send_request('blockchain.transaction.broadcast', [str(tx)], timeout=timeout)
if out != tx.txid():
raise Exception(out)
@@ -717,8 +717,9 @@ class Network(PrintError):
return await self.interface.request_chunk(height, tip=tip, can_return_early=can_return_early)
@best_effort_reliable
async def get_transaction(self, tx_hash: str) -> str:
return await self.interface.session.send_request('blockchain.transaction.get', [tx_hash])
async def get_transaction(self, tx_hash: str, *, timeout=None) -> str:
return await self.interface.session.send_request('blockchain.transaction.get', [tx_hash],
timeout=timeout)
@best_effort_reliable
async def get_history_for_scripthash(self, sh: str) -> List[dict]: