Skip to content

Commit

Permalink
Merge pull request #748 from pqv199x/get-candidate
Browse files Browse the repository at this point in the history
update bindata.go, update warning missed creating block
  • Loading branch information
thanhson1085 authored Oct 3, 2019
2 parents 8a666e1 + 7f3cc28 commit b43c3e5
Show file tree
Hide file tree
Showing 5 changed files with 2,786 additions and 44 deletions.
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ var (
TargetGasLimitFlag = cli.Uint64Flag{
Name: "targetgaslimit",
Usage: "Target gas limit sets the artificial target gas floor for the blocks to mine",
Value: params.GenesisGasLimit,
Value: params.TomoGenesisGasLimit,
}
EtherbaseFlag = cli.StringFlag{
Name: "etherbase",
Expand Down
12 changes: 6 additions & 6 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1240,10 +1240,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty
blockSigner, _ := c.RecoverSigner(block.Header())
header := block.Header()
validator, _ := c.RecoverValidator(block.Header())
ok := c.CheckMNTurn(bc, header, blockSigner)
ok := c.CheckMNTurn(bc, header, coinbase)
// if created block was your turn
if blockSigner == coinbase && ok {
log.Warn("Missed create block height", "number", block.Number(), "mining", true, "validator", validator.Hex())
if blockSigner != coinbase && ok {
log.Warn("Missed create block height", "number", block.Number(), "m1", blockSigner.Hex(), "m2", validator.Hex())
}
}
}
Expand Down Expand Up @@ -1481,10 +1481,10 @@ func (bc *BlockChain) insertBlock(block *types.Block) ([]interface{}, []*types.L
// block signer
blockSigner, _ := c.RecoverSigner(block.Header())
validator, _ := c.RecoverValidator(block.Header())
ok := c.CheckMNTurn(bc, header, blockSigner)
ok := c.CheckMNTurn(bc, header, coinbase)
// if created block was your turn
if blockSigner == coinbase && ok {
log.Warn("Missed create block height", "number", block.Number(), "mining", true, "validator", validator.Hex())
if blockSigner != coinbase && ok {
log.Warn("Missed create block height", "number", block.Number(), "m1", blockSigner.Hex(), "m2", validator.Hex())
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion eth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var DefaultConfig = Config{
DatabaseCache: 768,
TrieCache: 256,
TrieTimeout: 5 * time.Minute,
GasPrice: big.NewInt(18 * params.Shannon),
GasPrice: big.NewInt(0.25 * params.Shannon),

TxPool: core.DefaultTxPoolConfig,
GPO: gasprice.Config{
Expand Down
2,811 changes: 2,776 additions & 35 deletions internal/jsre/deps/bindata.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion params/protocol_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ package params
import "math/big"

var (
TargetGasLimit uint64 = GenesisGasLimit // The artificial target
TargetGasLimit uint64 = TomoGenesisGasLimit // The artificial target
)

const (
GasLimitBoundDivisor uint64 = 1024 // The bound divisor of the gas limit, used in update calculations.
MinGasLimit uint64 = 5000 // Minimum the gas limit may ever be.
GenesisGasLimit uint64 = 4712388 // Gas limit of the Genesis block.
TomoGenesisGasLimit uint64 = 84000000

MaximumExtraDataSize uint64 = 32 // Maximum size extra data may be after Genesis.
ExpByteGas uint64 = 10 // Times ceil(log256(exponent)) for the EXP instruction.
Expand Down

0 comments on commit b43c3e5

Please sign in to comment.