示例#1
0
        private void Store(Snapshot snapshot)
        {
            Rlp    rlp = _decoder.Encode(snapshot);
            Keccak key = GetSnapshotKey(snapshot.Hash);

            _blocksDb.Set(key, rlp.Bytes);
        }
示例#2
0
        public void Store(IDb db)
        {
            SnapshotDecoder decoder = new SnapshotDecoder();
            Rlp             rlp     = decoder.Encode(this);

            byte[] blob = rlp.Bytes;
            Keccak key  = GetSnapshotKey(Hash);

            db.Set(key, blob);
        }