private Snapshot LoadSnapshot(Keccak hash) { Keccak key = GetSnapshotKey(hash); var bytes = _blocksDb.Get(key); if (bytes == null) { return(null); } return(_decoder.Decode(bytes.AsRlpStream())); }
public static Snapshot LoadSnapshot(LruCache <Keccak, Address> sigCache, IDb db, Keccak hash) { Keccak key = GetSnapshotKey(hash); byte[] blob = db.Get(key); if (blob == null) { return(null); } SnapshotDecoder decoder = new SnapshotDecoder(); Snapshot snapshot = decoder.Decode(blob.AsRlpContext()); snapshot.SigCache = sigCache; return(snapshot); }