code: 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
  }
docs: // New creates a trie with an existing root node from db.
  //
  // If root is the zero hash or the sha3 hash of an empty string, the
  // trie is initially empty and does not require a database. Otherwise,
  // New will panic if db is nil and returns a MissingNodeError if root does
  // not exist in the database. Accessing the trie loads nodes from db on demand.