Пример #1
0
        public async Task <HashSet <CoinReference> > GetIndexConfirmed(UInt160 hash)
        {
            var raw = await _rocksDbContext.Get(hash.BuildIndexConfirmedKey());

            return(raw == null
                ? new HashSet <CoinReference>()
                : _binarySerializer.Deserialize <HashSet <CoinReference> >(raw));
        }
Пример #2
0
 public async Task SetIndexConfirmed(UInt160 hash, HashSet <CoinReference> coinReferences)
 {
     var bytes = _binarySerializer.Serialize(coinReferences);
     await _rocksDbContext.Save(hash.BuildIndexConfirmedKey(), bytes);
 }