better mempool queueing

This commit is contained in:
Ethan Buchman
2015-09-25 12:55:59 -04:00
parent beff6216fe
commit 12566f51af
7 changed files with 182 additions and 44 deletions

View File

@ -657,6 +657,10 @@ func (cs *ConsensusState) createProposalBlock() (block *types.Block, blockParts
return
}
txs := cs.mempoolReactor.Mempool.GetProposalTxs()
MaxTxsPerBlock := 100 // TODO
if len(txs) > MaxTxsPerBlock {
txs = txs[:MaxTxsPerBlock]
}
block = &types.Block{
Header: &types.Header{
ChainID: cs.state.ChainID,