Пример #1
0
        public async Task <CoinState[]> GetCoinStates(UInt256 txHash)
        {
            var raw = await _rocksDbContext.Get(txHash.BuildStateCoinKey());

            return(raw == null
                ? null
                : _binarySerializer.Deserialize <CoinState[]>(raw));
        }
Пример #2
0
 public async Task DeleteCoinStates(UInt256 txHash)
 {
     await _redisDbContext.Delete(txHash.BuildStateCoinKey());
 }
Пример #3
0
 public async Task AddCoinStates(UInt256 txHash, CoinState[] coinStates)
 {
     await _redisDbContext.Set(txHash.BuildStateCoinKey(), _binarySerializer.Serialize(coinStates));
 }
Пример #4
0
 public async Task AddCoinStates(UInt256 txHash, CoinState[] coinStates)
 {
     await _redisDbJsonContext.Set(txHash.BuildStateCoinKey(), _jsonConverter.SerializeObject(coinStates));
 }
Пример #5
0
        public async Task <CoinState[]> GetCoinStates(UInt256 txHash)
        {
            var raw = await _redisDbJsonContext.Get(txHash.BuildStateCoinKey());

            return(raw.IsNull ? null : _jsonConverter.DeserializeObject <CoinState[]>(raw));
        }