mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-24 16:26:02 +03:00
Spin slower send_transaction()
(#17166)
we currenly spin-wait for hearing back whether a transaction made it into the mempool or not (in FullNodeAPI.send_transaction()). We currently spin in a very tight loop, which appears to hog a significant amount of CPU. Increase the sleep to spin slower
This commit is contained in:
parent
507899ff19
commit
7d555feba3
@ -1276,7 +1276,7 @@ class FullNodeAPI:
|
||||
)
|
||||
# Waits for the transaction to go into the mempool, times out after 45 seconds.
|
||||
status, error = None, None
|
||||
sleep_time = 0.01
|
||||
sleep_time = 0.5
|
||||
for i in range(int(45 / sleep_time)):
|
||||
await asyncio.sleep(sleep_time)
|
||||
for potential_name, potential_status, potential_error in self.full_node.transaction_responses:
|
||||
|
Loading…
Reference in New Issue
Block a user