Skip to content
Draft
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
11 changes: 10 additions & 1 deletion src/libs/blockchain/mempool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,18 @@ export default class Mempool {

public static async receive(incoming: Transaction[], returnDiff = true) {
if (incoming.length === 0) {
// An idle peer (empty mempool) still pulls ours via the "mempool"
// exchange (handleMempool → receive(theirTxs).mempool). Return our
// own pool — not [] — otherwise the puller never learns our txs,
// the proposer's candidate block diverges from the shard's tx-set
// (broadcastBlockHash missingFromThem>0), and a tx submitted to a
// single node is never included. Mirrors the unseenTransactions===0
// path below.
const blockNumber = SecretaryManager.lastBlockRef
const finalPool = await this.getMempool(blockNumber)
return {
success: true,
mempool: [],
mempool: finalPool.filter(tx => tx.blockNumber <= blockNumber),
}
}

Expand Down
Loading