Exemple #1
0
        public async Task <Account> GetAccount(UInt160 hash)
        {
            var raw = await _rocksDbContext.Get(hash.BuildStateAccountKey());

            return(raw == null
                ? null
                : _binarySerializer.Deserialize <Account>(raw));
        }
Exemple #2
0
 public async Task DeleteAccount(UInt160 hash)
 {
     await _redisDbContext.Delete(hash.BuildStateAccountKey());
 }
        public async Task <Account> GetAccount(UInt160 hash)
        {
            var raw = await _redisDbJsonContext.Get(hash.BuildStateAccountKey());

            return(raw.IsNull ? null : _jsonConverter.DeserializeObject <Account>(raw));
        }