code: func (db *Database) insert(hash common.Hash, blob []byte, node node) {
  	// If the node's already cached, skip
  	if _, ok := db.dirties[hash]; ok {
  		return
  	}
  	// Create the cached entry for this node
  	entry := &cachedNode{
  		node:      simplifyNode(node),
  		size:      uint16(len(blob)),
  		flushPrev: db.newest,
  	}
  	for _, child := range entry.childs() {
  		if c := db.dirties[child]; c != nil {
  			c.parents++
  		}
  	}
  	db.dirties[hash] = entry
  
  	// Update the flush-list endpoints
  	if db.oldest == (common.Hash{}) {
  		db.oldest, db.newest = hash, hash
  	} else {
  		db.dirties[db.newest].flushNext, db.newest = hash, hash
  	}
  	db.dirtiesSize += common.StorageSize(common.HashLength + entry.size)
  }
docs: // insert inserts a collapsed trie node into the memory database. This method is
  // a more generic version of InsertBlob, supporting both raw blob insertions as
  // well ex trie node insertions. The blob must always be specified to allow proper
  // size tracking.