Cache genesis block root (#6069)

* Don't forget to set genesis blockroot
* Typo
* Merge branch 'master' into set-genesis-blk-root
This commit is contained in:
terence tsao 2020-06-01 10:39:09 -07:00 committed by GitHub
parent 31ef6befde
commit db9e02d7d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,6 +326,7 @@ func (s *Service) saveGenesisData(ctx context.Context, genesisState *stateTrie.B
if err != nil {
return errors.Wrap(err, "could not get genesis block root")
}
s.genesisRoot = genesisBlkRoot
if err := s.beaconDB.SaveBlock(ctx, genesisBlk); err != nil {
return errors.Wrap(err, "could not save genesis block")