Remove Explicit Declaration of Repeated Demo Config Values (#1209)

This commit is contained in:
Andrei Ivasko 2018-12-29 18:23:00 -08:00 committed by terence tsao
parent 2c2b30fa3a
commit fc97243bbd

View File

@ -129,42 +129,42 @@ var defaultBeaconConfig = &BeaconChainConfig{
}
var demoBeaconConfig = &BeaconChainConfig{
ZeroBalanceValidatorTTL: 4194304,
LatestRandaoMixesLength: 8192,
LatestBlockRootsLength: 8192,
MaxExits: 16,
MaxAttestations: 128,
MaxProposerSlashings: 16,
MaxCasperSlashings: 16,
ZeroBalanceValidatorTTL: defaultBeaconConfig.ZeroBalanceValidatorTTL,
LatestRandaoMixesLength: defaultBeaconConfig.LatestRandaoMixesLength,
LatestBlockRootsLength: defaultBeaconConfig.LatestBlockRootsLength,
MaxExits: defaultBeaconConfig.MaxExits,
MaxAttestations: defaultBeaconConfig.MaxAttestations,
MaxProposerSlashings: defaultBeaconConfig.MaxProposerSlashings,
MaxCasperSlashings: defaultBeaconConfig.MaxCasperSlashings,
ShardCount: 5,
MaxDeposit: 32,
MinTopUpSize: 1,
MinOnlineDepositSize: 16,
Gwei: 1e9,
MaxDepositInGwei: 32 * 1e9,
DepositsForChainStart: 16384,
MaxDeposit: defaultBeaconConfig.MaxDeposit,
MinTopUpSize: defaultBeaconConfig.MinTopUpSize,
MinOnlineDepositSize: defaultBeaconConfig.MinOnlineDepositSize,
Gwei: defaultBeaconConfig.Gwei,
MaxDepositInGwei: defaultBeaconConfig.MaxDepositInGwei,
DepositsForChainStart: defaultBeaconConfig.DepositsForChainStart,
TargetCommitteeSize: uint64(3),
SlotDuration: uint64(2),
CycleLength: uint64(5),
MinValidatorSetChangeInterval: uint64(15),
MinAttestationInclusionDelay: uint64(4),
SqrtExpDropTime: uint64(65536),
MinAttestationInclusionDelay: defaultBeaconConfig.MinAttestationInclusionDelay,
SqrtExpDropTime: defaultBeaconConfig.SqrtExpDropTime,
MinWithdrawalPeriod: uint64(20),
WithdrawalsPerCycle: uint64(2),
BaseRewardQuotient: defaultBeaconConfig.BaseRewardQuotient,
MaxValidatorChurnQuotient: uint64(32),
InitialForkVersion: 0,
InitialSlotNumber: 0,
RandBytes: 3,
MaxValidatorChurnQuotient: defaultBeaconConfig.MaxValidatorChurnQuotient,
InitialForkVersion: defaultBeaconConfig.InitialForkVersion,
InitialSlotNumber: defaultBeaconConfig.InitialSlotNumber,
RandBytes: defaultBeaconConfig.RandBytes,
InitialForkSlot: defaultBeaconConfig.InitialForkSlot,
SimulatedBlockRandao: [32]byte{'S', 'I', 'M', 'U', 'L', 'A', 'T', 'E', 'R'},
SyncPollingInterval: 2 * 4, // Query nodes over the network every 4 slots for sync status.
GenesisTime: time.Now(),
MaxNumLog2Validators: 24,
MaxNumLog2Validators: defaultBeaconConfig.MaxNumLog2Validators,
EpochLength: defaultBeaconConfig.EpochLength,
PowReceiptRootVotingPeriod: defaultBeaconConfig.PowReceiptRootVotingPeriod,
InactivityPenaltyQuotient: defaultBeaconConfig.InactivityPenaltyQuotient,
ZeroHash: [32]byte{},
ZeroHash: defaultBeaconConfig.ZeroHash,
EmptySignature: makeEmptySignature(),
CollectivePenaltyCalculationPeriod: defaultBeaconConfig.CollectivePenaltyCalculationPeriod,
IncluderRewardQuotient: defaultBeaconConfig.IncluderRewardQuotient,