Added new iterator and tests

This commit is contained in:
obscuren
2014-11-19 15:05:08 +01:00
parent 14e2e488fd
commit e70529a977
6 changed files with 160 additions and 11 deletions

View File

@ -148,9 +148,7 @@ func (self *StateObject) EachStorage(cb trie.EachCallback) {
func (self *StateObject) Sync() {
for key, value := range self.storage {
if value.Len() == 0 { // value.BigInt().Cmp(ethutil.Big0) == 0 {
//data := self.getStorage([]byte(key))
//fmt.Printf("deleting %x %x 0x%x\n", self.Address(), []byte(key), data)
if value.Len() == 0 {
self.State.Trie.Delete(string(key))
continue
}