Browse Source

add logic to check tx to the mempool if marked added

wb/txrset
William Banfield 3 years ago
parent
commit
041361da04
No known key found for this signature in database GPG Key ID: EFAD3442BF29E3AC
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      internal/state/execution.go

+ 5
- 1
internal/state/execution.go View File

@ -128,7 +128,6 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
MaxTxBytes: maxDataBytes,
},
)
if err != nil {
// The App MUST ensure that only valid (and hence 'processable') transactions
// enter the mempool. Hence, at this point, we can't have any non-processable
@ -148,6 +147,11 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
blockExec.logger.Debug("error removing transaction from the mempool", "error", err)
}
}
for _, rtx := range rpp.AddedTxs() {
if err := blockExec.mempool.CheckTx(ctx, rtx.Tx, nil, mempool.TxInfo{}); err != nil {
blockExec.logger.Debug("error removing transaction from the mempool", "error", err)
}
}
return state.MakeBlock(height, types.TxRecordsToTxs(rpp.IncludedTxs()), commit, evidence, proposerAddr)
}


Loading…
Cancel
Save