Forráskód Böngészése

Removed naively casting to bytes

obscuren 11 éve
szülő
commit
9b8a12b4b5
1 módosított fájl, 7 hozzáadás és 9 törlés
  1. 7 9
      ptrie/trie.go

+ 7 - 9
ptrie/trie.go

@@ -53,15 +53,13 @@ func (self *Trie) Root() []byte { return self.Hash() }
 func (self *Trie) Hash() []byte {
 	var hash []byte
 	if self.root != nil {
-		hash = self.root.Hash().([]byte)
-		/*
-			t := self.root.Hash()
-			if byts, ok := t.([]byte); ok {
-				hash = byts
-			} else {
-				hash = crypto.Sha3(ethutil.Encode(self.root.RlpData()))
-			}
-		*/
+		//hash = self.root.Hash().([]byte)
+		t := self.root.Hash()
+		if byts, ok := t.([]byte); ok {
+			hash = byts
+		} else {
+			hash = crypto.Sha3(ethutil.Encode(self.root.RlpData()))
+		}
 	} else {
 		hash = crypto.Sha3(ethutil.Encode(""))
 	}