@@ -369,20 +369,21 @@ func saveBlocks(blocks map[uint64]map[string]*types.Block, tx *sqlx.Tx, forceSlo
369369 return fmt .Errorf ("error executing stmtAttestations for block %v: %w" , b .Slot , err )
370370 }
371371 }
372-
373- for i , d := range b .Deposits {
374- err := utils .VerifyDepositSignature (& phase0.DepositData {
375- PublicKey : phase0 .BLSPubKey (d .PublicKey ),
376- WithdrawalCredentials : d .WithdrawalCredentials ,
377- Amount : phase0 .Gwei (d .Amount ),
378- Signature : phase0 .BLSSignature (d .Signature ),
379- }, domain )
380-
381- signatureValid := err == nil
382-
383- _ , err = stmtDeposits .Exec (b .Slot , i , b .BlockRoot , nil , d .PublicKey , d .WithdrawalCredentials , d .Amount , d .Signature , signatureValid )
384- if err != nil {
385- return fmt .Errorf ("error executing stmtDeposits for block %v index %v: %w" , b .Slot , i , err )
372+ if utils .EpochOfSlot (b .Slot ) < utils .Config .ClConfig .ElectraForkEpoch {
373+ for i , d := range b .Deposits {
374+ err := utils .VerifyDepositSignature (& phase0.DepositData {
375+ PublicKey : phase0 .BLSPubKey (d .PublicKey ),
376+ WithdrawalCredentials : d .WithdrawalCredentials ,
377+ Amount : phase0 .Gwei (d .Amount ),
378+ Signature : phase0 .BLSSignature (d .Signature ),
379+ }, domain )
380+
381+ signatureValid := err == nil
382+
383+ _ , err = stmtDeposits .Exec (b .Slot , i , b .BlockRoot , nil , d .PublicKey , d .WithdrawalCredentials , d .Amount , d .Signature , signatureValid )
384+ if err != nil {
385+ return fmt .Errorf ("error executing stmtDeposits for block %v index %v: %w" , b .Slot , i , err )
386+ }
386387 }
387388 }
388389
0 commit comments