Esempio n. 1
0
        public async Task <BlockHeader> GetBlockHeader(UInt256 hash)
        {
            var blockHeaderRedisValue = await _redisDbContext.Get(hash.BuildDataBlockKey());

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

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

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