From 378c0437782e5f74a43d27aa3895d125c9039e1b Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 22 Jul 2019 00:37:07 -0700 Subject: [PATCH] [config] use a constant to define large block per epoch Signed-off-by: Leo Chen --- internal/configs/sharding/fixedschedule.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/configs/sharding/fixedschedule.go b/internal/configs/sharding/fixedschedule.go index 7922614f0..129c129d4 100644 --- a/internal/configs/sharding/fixedschedule.go +++ b/internal/configs/sharding/fixedschedule.go @@ -4,6 +4,11 @@ import ( "math/big" ) +const ( + // VLBPE is a Very Large Block Per Epoch + VLBPE = 1000000000000 +) + type fixedSchedule struct { instance Instance } @@ -15,7 +20,7 @@ func (s fixedSchedule) InstanceForEpoch(epoch *big.Int) Instance { } func (s fixedSchedule) BlocksPerEpoch() uint64 { - return 1000000000000 + return VLBPE } // NewFixedSchedule returns a sharding configuration schedule that uses the