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)); }
public async Task SetIndexConfirmed(UInt160 hash, HashSet <CoinReference> coinReferences) { var bytes = _binarySerializer.Serialize(coinReferences); await _rocksDbContext.Save(hash.BuildIndexConfirmedKey(), bytes); }