From a6d978c6fc268ea5fa6026a844362c8c9689949c Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 8 Apr 2024 10:24:27 +0800 Subject: [PATCH] use checkpoint --- driver/chain_syncer/chain_syncer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/driver/chain_syncer/chain_syncer.go b/driver/chain_syncer/chain_syncer.go index cff727d48..2f356296d 100644 --- a/driver/chain_syncer/chain_syncer.go +++ b/driver/chain_syncer/chain_syncer.go @@ -171,7 +171,10 @@ func (s *L2ChainSyncer) needNewBeaconSyncTriggered() (uint64, bool, error) { var blockID uint64 switch s.syncMode { case downloader.SnapSync.String(): - blockID = stateVars.B.NumBlocks + blockID, err = s.rpc.L2CheckPoint.BlockNumber(s.ctx) + if err != nil { + return 0, false, err + } case downloader.FullSync.String(): blockID = stateVars.B.LastVerifiedBlockId default: