code: func WritePreimages(db ethdb.Writer, preimages map[common.Hash][]byte) {
  	for hash, preimage := range preimages {
  		if err := db.Put(preimageKey(hash), preimage); err != nil {
  			log.Crit("Failed to store trie preimage", "err", err)
  		}
  	}
  	preimageCounter.Inc(int64(len(preimages)))
  	preimageHitCounter.Inc(int64(len(preimages)))
  }
docs: // WritePreimages writes the provided set of preimages to the database.