use cache from drand

This commit is contained in:
nikkolasg 2020-08-11 12:58:27 +01:00
parent 45db0abb59
commit 7a7cce2538
No known key found for this signature in database
GPG Key ID: 3F484EC30DEED100

View File

@ -170,6 +170,9 @@ func (db *DrandBeacon) VerifyEntry(curr types.BeaconEntry, prev types.BeaconEntr
// TODO handle genesis better // TODO handle genesis better
return nil return nil
} }
if be := db.getCachedValue(curr.Round); be != nil {
return be
}
b := &dchain.Beacon{ b := &dchain.Beacon{
PreviousSig: prev.Data, PreviousSig: prev.Data,
Round: curr.Round, Round: curr.Round,