prysm-pulse/beacon-chain/powchain/deposit.go
Preston Van Loon 98e26d1dcc
Bulk verify block deposits with BLS (#6454)
* First pass at adding bulk signature verification for block deposits

* checkpoint

* some refactoring to allow for bulk deposit signature verification

* nil check

* fix goimports

* fmt

* rename ProcessPreGenesisDeposit -> ProcessPreGenesisDeposits
2020-06-29 20:52:19 -05:00

18 lines
489 B
Go

package powchain
import (
"context"
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
)
func (s *Service) processDeposit(eth1Data *ethpb.Eth1Data, deposit *ethpb.Deposit) error {
var err error
if err := s.preGenesisState.SetEth1Data(eth1Data); err != nil {
return err
}
s.preGenesisState, err = blocks.ProcessPreGenesisDeposits(context.Background(), s.preGenesisState, []*ethpb.Deposit{deposit})
return err
}