From 787a61bb27b9f51f4af67c69eb8f1c5869ae3144 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 17 Jun 2015 11:24:40 +0200 Subject: core/state, core/vm: reworked storage get / set to use common.Hash --- common/types.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/types.go b/common/types.go index d05c21eec..e41112a77 100644 --- a/common/types.go +++ b/common/types.go @@ -62,6 +62,10 @@ func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value { return reflect.ValueOf(h) } +func EmptyHash(h Hash) bool { + return h == Hash{} +} + /////////// Address func BytesToAddress(b []byte) Address { var a Address -- cgit v1.2.3 From c590b505ed92957baf2ab4baa1788c6b0ec862cc Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 20 Jun 2015 20:31:11 +0200 Subject: core, ethdb, trie: validate database errors --- common/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/db.go b/common/db.go index c12a2cfb0..7f3becd5a 100644 --- a/common/db.go +++ b/common/db.go @@ -2,7 +2,7 @@ package common // Database interface type Database interface { - Put(key []byte, value []byte) + Put(key []byte, value []byte) error Get(key []byte) ([]byte, error) Delete(key []byte) error Close() -- cgit v1.2.3