コード例 #1
0
        public async Task <BlockHeader> GetBlockHeader(UInt256 hash)
        {
            var blockHeaderRedisValue = await _redisDbContext.Get(hash.BuildDataBlockKey());

            return(blockHeaderRedisValue.IsNull ? null : _binarySerializer.Deserialize <BlockHeader>(blockHeaderRedisValue));
        }
コード例 #2
0
        public async Task <BlockHeader> GetBlockHeader(UInt256 hash)
        {
            var blockHeaderRedisValue = await _redisDbContext.Get(hash.BuildDataBlockKey());

            return(JsonConvert.DeserializeObject <BlockHeader>(blockHeaderRedisValue));
        }
コード例 #3
0
        public async Task <BlockHeader> GetBlockHeader(UInt256 hash)
        {
            var rawHeader = await _rocksDbContext.Get(hash.BuildDataBlockKey());

            return(rawHeader == null ? null : _binarySerializer.Deserialize <BlockHeader>(rawHeader));
        }