return nil, err
}
- if len(arbitrary) > consensus.CoinbaseArbitrarySizeLimit {
+ if len(arbitrary) > consensus.ActiveNetParams.CoinbaseArbitrarySizeLimit {
return nil, validation.ErrCoinbaseArbitraryOversize
}
PreviousBlockHash: preBlockHash,
Timestamp: timestamp,
BlockCommitment: types.BlockCommitment{},
- BlockWitness: types.BlockWitness{Witness: make([][]byte, consensus.NumOfConsensusNode)},
+ BlockWitness: types.BlockWitness{Witness: make([][]byte, consensus.ActiveNetParams.NumOfConsensusNode)},
},
}
bcBlock := &bc.Block{BlockHeader: &bc.BlockHeader{Height: nextBlockHeight}}
continue
}
- if gasUsed+uint64(gasStatus.GasUsed) > consensus.MaxBlockGas {
+ if gasUsed+uint64(gasStatus.GasUsed) > consensus.ActiveNetParams.MaxBlockGas {
break
}
b.Transactions = append(b.Transactions, txDesc.Tx)
txEntries = append(txEntries, tx)
gasUsed += uint64(gasStatus.GasUsed)
- if gasUsed == consensus.MaxBlockGas {
+ if gasUsed == consensus.ActiveNetParams.MaxBlockGas {
break
}