Check for shutdown in block scanning loop.

This commit is contained in:
tecnovert
2024-06-14 00:41:51 +02:00
parent 40eff0ce0f
commit 00912b277a
2 changed files with 11 additions and 2 deletions

View File

@@ -849,7 +849,7 @@ class DCRInterface(Secp256k1Interface):
blockchaininfo = self.rpc('getblockchaininfo')
last_block_header = self.rpc('getblockheader', [blockchaininfo['bestblockhash']])
max_tries = 5000
max_tries = 15000
for i in range(max_tries):
prev_block_header = self.rpc('getblockheader', [last_block_header['previousblockhash']])
if prev_block_header['time'] <= time: