From c215d833355b1f0f72a16b439d049ea4c99bfa0c Mon Sep 17 00:00:00 2001 From: rev-chaos Date: Sat, 8 Feb 2020 12:35:32 +0800 Subject: [PATCH] flush mempool after storage --- core/consensus/src/engine.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/consensus/src/engine.rs b/core/consensus/src/engine.rs index 26fdcf421..a95afbf31 100644 --- a/core/consensus/src/engine.rs +++ b/core/consensus/src/engine.rs @@ -195,10 +195,6 @@ impl Engine for ConsensusEngine< } }; - self.adapter - .flush_mempool(ctx.clone(), &ordered_tx_hashes) - .await?; - // Execute transactions self.exec( pill.block.header.order_root.clone(), @@ -220,6 +216,10 @@ impl Engine for ConsensusEngine< self.update_status(height, metadata, pill.block, proof, full_txs) .await?; + self.adapter + .flush_mempool(ctx.clone(), &ordered_tx_hashes) + .await?; + self.adapter.broadcast_height(ctx.clone(), height).await?; let mut set = self.exemption_hash.write();