From 217516d7d75e648945f072f8a4cd425a2bde2acc Mon Sep 17 00:00:00 2001 From: envestcc Date: Mon, 12 Jun 2023 11:33:45 +0800 Subject: [PATCH] build contract staking indexer only when staking protocol enabled --- chainservice/builder.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chainservice/builder.go b/chainservice/builder.go index c397f5d4b9..6a00130c7b 100644 --- a/chainservice/builder.go +++ b/chainservice/builder.go @@ -298,6 +298,9 @@ func (builder *Builder) buildSGDRegistry(forTest bool) error { } func (builder *Builder) buildContractStakingIndexer(forTest bool) error { + if !builder.cfg.Chain.EnableStakingProtocol { + return nil + } if builder.cs.contractStakingIndexer != nil { return nil }