mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
add to cache (#1988)
This commit is contained in:
parent
e5f66d0b21
commit
d5c05f083b
@ -175,6 +175,12 @@ func (db *BeaconDB) UpdateChainHead(block *pb.BeaconBlock, beaconState *pb.Beaco
|
||||
return fmt.Errorf("unable to encode beacon state: %v", err)
|
||||
}
|
||||
|
||||
currentState, ok := proto.Clone(beaconState).(*pb.BeaconState)
|
||||
if !ok {
|
||||
return errors.New("could not clone beacon state")
|
||||
}
|
||||
db.currentState = currentState
|
||||
|
||||
slotBinary := encodeSlotNumber(block.Slot)
|
||||
|
||||
return db.update(func(tx *bolt.Tx) error {
|
||||
|
Loading…
Reference in New Issue
Block a user