Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

fix(muta): flush mempool after storage #155

Merged
merged 1 commit into from
Feb 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/consensus/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ impl<Adapter: ConsensusAdapter + 'static> Engine<FixedPill> for ConsensusEngine<
}
};

self.adapter
.flush_mempool(ctx.clone(), &ordered_tx_hashes)
.await?;

// Execute transactions
self.exec(
pill.block.header.order_root.clone(),
Expand All @@ -220,6 +216,10 @@ impl<Adapter: ConsensusAdapter + 'static> Engine<FixedPill> 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();
Expand Down