mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-21 00:24:37 +03:00
Block batch_update if pending root.
This commit is contained in:
parent
531443e5b8
commit
9c2dc16213
@ -117,6 +117,9 @@ class DataLayer:
|
||||
# Make sure we update based on the latest confirmed root.
|
||||
async with self.lock:
|
||||
await self._update_confirmation_status(tree_id=tree_id)
|
||||
pending_root: Optional[Root] = await self.data_store.get_pending_root(tree_id=tree_id)
|
||||
if pending_root is not None:
|
||||
raise Exception("Already have a pending root waiting for confirmation.")
|
||||
t1 = time.monotonic()
|
||||
batch_hash = await self.data_store.insert_batch(tree_id, changelist, lock=True)
|
||||
t2 = time.monotonic()
|
||||
|
Loading…
Reference in New Issue
Block a user