From 2857789842471a9f3dcc41948859620e6b240fbc Mon Sep 17 00:00:00 2001 From: frozen <355847+Frozen@users.noreply.github.com> Date: Fri, 17 Nov 2023 15:49:27 -0400 Subject: [PATCH] Fix for num shards. --- internal/configs/node/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/configs/node/config.go b/internal/configs/node/config.go index 11dd5ba59..307dcc029 100644 --- a/internal/configs/node/config.go +++ b/internal/configs/node/config.go @@ -344,7 +344,7 @@ func (conf *ConfigType) ShardIDFromKey(key *bls_core.PublicKey) (uint32, error) "cannot convert libbls public key %s to internal form", key.SerializeToHexStr()) } - epoch := conf.networkType.ChainConfig().StakingEpoch + epoch := conf.networkType.ChainConfig().HIP30Epoch numShards := conf.shardingSchedule.InstanceForEpoch(epoch).NumShards() shardID := new(big.Int).Mod(pubKey.Big(), big.NewInt(int64(numShards))) return uint32(shardID.Uint64()), nil