public async Task <CoinState[]> GetCoinStates(UInt256 txHash) { var raw = await _rocksDbContext.Get(txHash.BuildStateCoinKey()); return(raw == null ? null : _binarySerializer.Deserialize <CoinState[]>(raw)); }
public async Task DeleteCoinStates(UInt256 txHash) { await _redisDbContext.Delete(txHash.BuildStateCoinKey()); }
public async Task AddCoinStates(UInt256 txHash, CoinState[] coinStates) { await _redisDbContext.Set(txHash.BuildStateCoinKey(), _binarySerializer.Serialize(coinStates)); }
public async Task AddCoinStates(UInt256 txHash, CoinState[] coinStates) { await _redisDbJsonContext.Set(txHash.BuildStateCoinKey(), _jsonConverter.SerializeObject(coinStates)); }
public async Task <CoinState[]> GetCoinStates(UInt256 txHash) { var raw = await _redisDbJsonContext.Get(txHash.BuildStateCoinKey()); return(raw.IsNull ? null : _jsonConverter.DeserializeObject <CoinState[]>(raw)); }