public AccountStateEntity GetAccount(byte[] key, byte[] root_hash)
        {
            Trie trie = new Trie(this, root_hash);

            byte[] value = trie.Get(RLP.EncodeElement(key));

            return(value.IsNotNullOrEmpty() ? AccountStateEntity.Parse(value) : null);
        }
Beispiel #2
0
 public void OnValue(byte[] node_hash, TrieNode node, byte[] key, byte[] value)
 {
     try
     {
         Logger.Info(string.Format("Account info : {0}", AccountStateEntity.Parse(value)));
     }
     catch (System.Exception e)
     {
         Logger.Error(e.Message);
     }
 }