code: func (db *Database) reference(child common.Hash, parent common.Hash) {
  	// If the node does not exist, it's a node pulled from disk, skip
  	node, ok := db.dirties[child]
  	if !ok {
  		return
  	}
  	// If the reference already exists, only duplicate for roots
  	if db.dirties[parent].children == nil {
  		db.dirties[parent].children = make(map[common.Hash]uint16)
  		db.childrenSize += cachedNodeChildrenSize
  	} else if _, ok = db.dirties[parent].children[child]; ok && parent != (common.Hash{}) {
  		return
  	}
  	node.parents++
  	db.dirties[parent].children[child]++
  	if db.dirties[parent].children[child] == 1 {
  		db.childrenSize += common.HashLength + 2 // uint16 counter
  	}
  }
docs: // reference is the private locked version of Reference.