Merge branch 'develop' of https://github.com/tgerring/go-ethereum into tests

Conflicts:
	p2p/messenger_test.go
	trie/trie_test.go
This commit is contained in:
Taylor Gerring 2014-11-14 15:19:50 -06:00
commit e6e468ef59
1 changed files with 4 additions and 7 deletions

View File

@ -327,14 +327,11 @@ func (s *TrieSuite) TestBeginsWith(c *checker.C) {
c.Assert(BeginsWith(b, a), checker.Equals, true)
}
func TestItems(t *testing.T) {
_, trie := NewTrie()
trie.Update("A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
func (s *TrieSuite) TestItems(c *checker.C) {
s.trie.Update("A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
exp := "d23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab"
if bytes.Compare(trie.GetRoot(), ethutil.Hex2Bytes(exp)) != 0 {
t.Errorf("Expected root to be %s but got", exp, trie.GetRoot())
}
c.Assert(s.trie.GetRoot(), checker.DeepEquals, ethutil.Hex2Bytes(exp))
}
/*