Fixed mkdnode & added some tests

This commit is contained in:
obscuren
2015-03-19 10:57:02 +01:00
parent e67d32b467
commit d7ab716eea
8 changed files with 55 additions and 16 deletions

View File

@ -5,8 +5,8 @@ import (
"fmt"
"testing"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
)
type Db map[string][]byte
@ -32,6 +32,15 @@ func TestEmptyTrie(t *testing.T) {
}
}
func TestNull(t *testing.T) {
trie := NewEmpty()
key := make([]byte, 32)
value := common.FromHex("0x823140710bf13990e4500136726d8b55")
trie.Update(key, value)
value = trie.Get(key)
}
func TestInsert(t *testing.T) {
trie := NewEmpty()