X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;ds=sidebyside;f=proposal%2Fproposal.go;h=a4c51e43870ce6b92f7a6d6cca7a4977523a5dca;hb=3eb2ec67d268c0e1abf3d5346aee60e9c728ab6e;hp=d2d045e82dc8cfa1dea7ee9a1e1d3215e01defa1;hpb=1005d5aeca37334f61be9ffb3631137eb7d6088d;p=bytom%2Fvapor.git diff --git a/proposal/proposal.go b/proposal/proposal.go index d2d045e8..a4c51e43 100644 --- a/proposal/proposal.go +++ b/proposal/proposal.go @@ -37,7 +37,7 @@ func createCoinbaseTx(accountManager *account.Manager, blockHeight uint64) (tx * return nil, err } - if len(arbitrary) > consensus.CoinbaseArbitrarySizeLimit { + if len(arbitrary) > consensus.ActiveNetParams.CoinbaseArbitrarySizeLimit { return nil, validation.ErrCoinbaseArbitraryOversize } @@ -99,7 +99,7 @@ func NewBlockTemplate(c *protocol.Chain, txPool *protocol.TxPool, accountManager 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}} @@ -133,7 +133,7 @@ func NewBlockTemplate(c *protocol.Chain, txPool *protocol.TxPool, accountManager continue } - if gasUsed+uint64(gasStatus.GasUsed) > consensus.MaxBlockGas { + if gasUsed+uint64(gasStatus.GasUsed) > consensus.ActiveNetParams.MaxBlockGas { break } @@ -149,7 +149,7 @@ func NewBlockTemplate(c *protocol.Chain, txPool *protocol.TxPool, accountManager 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 }