func (t *Trie) NodeIterator(start []byte) NodeIterator {
	return newNodeIterator(t, start)
}
NodeIterator returns an iterator that returns nodes of the trie. Iteration starts at
the key after the given start key.
package trie
import (
	"bytes"
	"fmt"
	"github.com/dappledger/AnnChain/eth/common"
	"github.com/dappledger/AnnChain/eth/crypto"
	"github.com/dappledger/AnnChain/eth/log"
	"github.com/dappledger/AnnChain/eth/metrics"
)
var (
	emptyRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
	emptyState = crypto.Keccak256Hash(nil)
)
var (
	cacheMissCounter   = metrics.NewRegisteredCounter("trie/cachemiss", nil)
	cacheUnloadCounter = metrics.NewRegisteredCounter("trie/cacheunload", nil)
)
func CacheMisses() int64 {
	return cacheMissCounter.Count()
}
func CacheUnloads() int64 {
	return cacheUnloadCounter.Count()
}
type LeafCallback func(leaf []byte, parent common.Hash) error
type Trie struct {
	db   *Database
	root node
	cachegen, cachelimit uint16
}
func (t *Trie) SetCacheLimit(l uint16) {
	t.cachelimit = l
}
func (t *Trie) newFlag() nodeFlag {
	return nodeFlag{dirty: true, gen: t.cachegen}
}
func New(root common.Hash, db *Database) (*Trie, error) {
	if db == nil {
		panic("trie.New called without a database")
	}
	trie := &Trie{
		db: db,
	}
	if root != (common.Hash{}) && root != emptyRoot {
		rootnode, err := trie.resolveHash(root[:], nil)
		if err != nil {
			return nil, err
		}
		trie.root = rootnode
	}
	return trie, nil
}