From 58b8f900dfeb1155a65cb282e34117f365d5abdb Mon Sep 17 00:00:00 2001 From: Antony Denyer Date: Wed, 21 Sep 2022 12:04:35 +0100 Subject: [PATCH] go fmt --- params/config.go | 16 ++++++++-------- params/config_test.go | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/params/config.go b/params/config.go index d8e1a7d8ef..d6ddddf9a2 100644 --- a/params/config.go +++ b/params/config.go @@ -409,13 +409,13 @@ func (c *IstanbulConfig) String() string { } type BFTConfig struct { - EpochLength uint64 `json:"epochlength"` // Number of blocks that should pass before pending validator votes are reset - BlockPeriodSeconds uint64 `json:"blockperiodseconds"` // Minimum time between two consecutive IBFT or QBFT blocks’ timestamps in seconds - EmptyBlockPeriodSeconds *uint64 `json:"emptyblockperiodseconds,omitempty"` // Minimum time between two consecutive IBFT or QBFT a block and empty block’ timestamps in seconds - RequestTimeoutSeconds uint64 `json:"requesttimeoutseconds"` // Minimum request timeout for each IBFT or QBFT round in milliseconds - ProposerPolicy uint64 `json:"policy"` // The policy for proposer selection - Ceil2Nby3Block *big.Int `json:"ceil2Nby3Block,omitempty"` // Number of confirmations required to move from one state to next [2F + 1 to Ceil(2N/3)] - ValidatorContractAddress common.Address `json:"validatorcontractaddress"` // Smart contract address for list of validators + EpochLength uint64 `json:"epochlength"` // Number of blocks that should pass before pending validator votes are reset + BlockPeriodSeconds uint64 `json:"blockperiodseconds"` // Minimum time between two consecutive IBFT or QBFT blocks’ timestamps in seconds + EmptyBlockPeriodSeconds *uint64 `json:"emptyblockperiodseconds,omitempty"` // Minimum time between two consecutive IBFT or QBFT a block and empty block’ timestamps in seconds + RequestTimeoutSeconds uint64 `json:"requesttimeoutseconds"` // Minimum request timeout for each IBFT or QBFT round in milliseconds + ProposerPolicy uint64 `json:"policy"` // The policy for proposer selection + Ceil2Nby3Block *big.Int `json:"ceil2Nby3Block,omitempty"` // Number of confirmations required to move from one state to next [2F + 1 to Ceil(2N/3)] + ValidatorContractAddress common.Address `json:"validatorcontractaddress"` // Smart contract address for list of validators } type IBFTConfig struct { @@ -447,7 +447,7 @@ type Transition struct { Algorithm string `json:"algorithm,omitempty"` EpochLength uint64 `json:"epochlength,omitempty"` // Number of blocks that should pass before pending validator votes are reset BlockPeriodSeconds uint64 `json:"blockperiodseconds,omitempty"` // Minimum time between two consecutive IBFT or QBFT blocks’ timestamps in seconds - EmptyBlockPeriodSeconds *uint64 `json:"emptyblockperiodseconds,omitempty"` // Minimum time between two consecutive IBFT or QBFT a block and empty block’ timestamps in seconds + EmptyBlockPeriodSeconds *uint64 `json:"emptyblockperiodseconds,omitempty"` // Minimum time between two consecutive IBFT or QBFT a block and empty block’ timestamps in seconds RequestTimeoutSeconds uint64 `json:"requesttimeoutseconds,omitempty"` // Minimum request timeout for each IBFT or QBFT round in milliseconds ContractSizeLimit uint64 `json:"contractsizelimit,omitempty"` // Maximum smart contract code size ValidatorContractAddress common.Address `json:"validatorcontractaddress"` // Smart contract address for list of validators diff --git a/params/config_test.go b/params/config_test.go index 9b66b1428a..47e72158b0 100644 --- a/params/config_test.go +++ b/params/config_test.go @@ -332,7 +332,6 @@ func TestCheckTransitionsData(t *testing.T) { var ibftTransitionsConfig, qbftTransitionsConfig, invalidTransition, invalidBlockOrder []Transition var emptyBlockPeriodSeconds uint64 = 10 - tranI0 := Transition{big.NewInt(0), IBFT, 30000, 5, nil, 10, 50, common.Address{}, "", nil, nil, nil, nil, 0, nil, 0} tranQ5 := Transition{big.NewInt(5), QBFT, 30000, 5, &emptyBlockPeriodSeconds, 10, 50, common.Address{}, "", nil, nil, nil, nil, 0, nil, 0} tranI10 := Transition{big.NewInt(10), IBFT, 30000, 5, nil, 10, 50, common.Address{}, "", nil, nil, nil, nil, 0, nil, 0}