code: func New(root common.Hash, db Database) (*StateDB, error) {
  	tr, err := db.OpenTrie(root)
  	if err != nil {
  		return nil, err
  	}
  	return &StateDB{
  		db:                db,
  		trie:              tr,
  		stateObjects:      make(map[common.Address]*stateObject),
  		stateObjectsDirty: make(map[common.Address]struct{}),
  		logs:              make(map[common.Hash][]*types.Log),
  		preimages:         make(map[common.Hash][]byte),
  		journal:           newJournal(),
  	}, nil
  }
docs: // Create a new state from a given trie.