Skip to content

Instantly share code, notes, and snippets.

@schmir
Created March 20, 2014 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmir/9661628 to your computer and use it in GitHub Desktop.
Save schmir/9661628 to your computer and use it in GitHub Desktop.
In [23]: from pyethereum import trie
In [24]: t=trie.Trie("foo2")
In [25]: t.__dict__
Out[25]: {'db': <pyethereum.trie.DB at 0x128a950>, 'debug': False, 'root': ''}
In [26]: t.update("foo", "bar")
In [27]: t.__dict__
Out[27]:
{'db': <pyethereum.trie.DB at 0x128a950>,
'debug': False,
'root': [' foo', 'bar']}
In [28]: t.update("foob", "bar")
In [29]: t.__dict__
Out[29]:
{'db': <pyethereum.trie.DB at 0x128a950>,
'debug': False,
'root': '\xd0K<\xe8\xa1\x0eWD\x91\x15\xfe\xfa8\x93a,\xeb\xbf\xe4\xc9@\xb1\xdc\x02M\xfa\xc3\x188\xcd~\x7f'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment