Commit 8222696c authored by vipwzw's avatar vipwzw Committed by 33cn

update new proto

parent c07239ab
......@@ -176,7 +176,7 @@ func (h *hasher) store(n node, db *Database, force bool) (node, error) {
//这个不用非常精确,只要保持确定性就可以了
size := n.size()
if size < 64 && !force {
return n, nil // Nodes smaller than 32 bytes are stored inside their parent
return n, nil // Nodes smaller than 64 bytes are stored inside their parent
}
nn := n.create()
data, err := proto.Marshal(nn)
......
This diff is collapsed.
......@@ -37,6 +37,7 @@ import (
"github.com/33cn/chain33/common"
dbm "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/log"
comTy "github.com/33cn/chain33/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
......@@ -54,6 +55,7 @@ var (
func init() {
rand.Seed(time.Now().UnixNano())
log.SetLogLevel("err")
spew.Config.Indent = " "
spew.Config.DisableMethods = false
}
......
......@@ -29,10 +29,12 @@ import (
"github.com/33cn/chain33/common"
dbm "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/log"
)
func init() {
mrand.Seed(time.Now().UnixNano())
log.SetLogLevel("err")
}
// makeProvers creates Merkle trie provers based on different implementations to
......
......@@ -735,7 +735,6 @@ func get10000(t assert.TestingT, root common.Hash, db dbm.DB, keys map[string]st
database := NewDatabase(db)
t1, _ := New(root, database)
for k, v := range keys {
fmt.Println(k, v)
value, err := t1.TryGet([]byte(k))
assert.Nil(t, err)
assert.Equal(t, string(value), v)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment