use BlockGasLimit instead of residual for partitioning
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
28fe602a9b
commit
8eff3a25f9
@ -104,13 +104,12 @@ func (mp *MessagePool) selectMessagesOptimal(curTs, ts *types.TipSet, tq float64
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. Parition chains into blocks (without trimming)
|
// 3. Parition chains into blocks (without trimming)
|
||||||
// we use the residual gas limit from the priority message selection as those message
|
// we use the full blockGasLimit (as opposed to the residual gas limit from the
|
||||||
// will be unconditionally included
|
// priority message selection) as we have to account for what other miners are doing
|
||||||
residualGasLimit := gasLimit
|
|
||||||
nextChain := 0
|
nextChain := 0
|
||||||
partitions := make([][]*msgChain, MaxBlocks)
|
partitions := make([][]*msgChain, MaxBlocks)
|
||||||
for i := 0; i < MaxBlocks && nextChain < len(chains); i++ {
|
for i := 0; i < MaxBlocks && nextChain < len(chains); i++ {
|
||||||
gasLimit := residualGasLimit
|
gasLimit := int64(build.BlockGasLimit)
|
||||||
for nextChain < len(chains) {
|
for nextChain < len(chains) {
|
||||||
chain := chains[nextChain]
|
chain := chains[nextChain]
|
||||||
partitions[i] = append(partitions[i], chain)
|
partitions[i] = append(partitions[i], chain)
|
||||||
|
Loading…
Reference in New Issue
Block a user