code: func (t *SecureTrie) Commit(onleaf LeafCallback) (root common.Hash, err error) {
  	// Write all the pre-images to the actual disk database
  	if len(t.getSecKeyCache()) > 0 {
  		t.trie.db.lock.Lock()
  		for hk, key := range t.secKeyCache {
  			t.trie.db.insertPreimage(common.BytesToHash([]byte(hk)), key)
  		}
  		t.trie.db.lock.Unlock()
  
  		t.secKeyCache = make(map[string][]byte)
  	}
  	// Commit the trie to its intermediate node database
  	return t.trie.Commit(onleaf)
  }
docs: // Commit writes all nodes and the secure hash pre-images to the trie's database.
  // Nodes are stored with their sha3 hash as the key.
  //
  // Committing flushes nodes from memory. Subsequent Get calls will load nodes
  // from the database.