public async Task <HashSet <CoinReference> > GetIndexClaimable(UInt160 hash) { var raw = await _rocksDbContext.Get(hash.BuildIndexClaimableKey()); return(raw == null ? new HashSet <CoinReference>() : _binarySerializer.Deserialize <HashSet <CoinReference> >(raw)); }
public async Task SetIndexClaimable(UInt160 hash, HashSet <CoinReference> coinReferences) { var bytes = _binarySerializer.Serialize(coinReferences); await _rocksDbContext.Save(hash.BuildIndexClaimableKey(), bytes); }