From 018c2cca435ea8831e5f75191b395994ead169c6 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 6 Mar 2023 12:26:17 +0800 Subject: [PATCH] feat(snapshot): Close snapshot p2p protocol when using zktrie. (#239) * Close snapshot p2p protocol when use zktrie. * trigger ci --- eth/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/backend.go b/eth/backend.go index 9b4ee254ab..befc1d9d4b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -516,7 +516,7 @@ func (s *Ethereum) BloomIndexer() *core.ChainIndexer { return s.bloomIndexer } // network protocols to start. func (s *Ethereum) Protocols() []p2p.Protocol { protos := eth.MakeProtocols((*ethHandler)(s.handler), s.networkID, s.ethDialCandidates) - if s.config.SnapshotCache > 0 { + if !s.blockchain.Config().Zktrie && s.config.SnapshotCache > 0 { protos = append(protos, snap.MakeProtocols((*snapHandler)(s.handler), s.snapDialCandidates)...) } return protos