public async Task <BlockHeader> GetBlockHeader(UInt256 hash) { var blockHeaderRedisValue = await _redisDbContext.Get(hash.BuildDataBlockKey()); return(blockHeaderRedisValue.IsNull ? null : _binarySerializer.Deserialize <BlockHeader>(blockHeaderRedisValue)); }
public async Task <BlockHeader> GetBlockHeader(UInt256 hash) { var blockHeaderRedisValue = await _redisDbContext.Get(hash.BuildDataBlockKey()); return(JsonConvert.DeserializeObject <BlockHeader>(blockHeaderRedisValue)); }
public async Task <BlockHeader> GetBlockHeader(UInt256 hash) { var rawHeader = await _rocksDbContext.Get(hash.BuildDataBlockKey()); return(rawHeader == null ? null : _binarySerializer.Deserialize <BlockHeader>(rawHeader)); }