code: func WriteTd(db ethdb.Writer, hash common.Hash, number uint64, td *big.Int) {
  	data, err := rlp.EncodeToBytes(td)
  	if err != nil {
  		log.Crit("Failed to RLP encode block total difficulty", "err", err)
  	}
  	if err := db.Put(headerTDKey(number, hash), data); err != nil {
  		log.Crit("Failed to store block total difficulty", "err", err)
  	}
  }
docs: // WriteTd stores the total difficulty of a block into the database.