- // These are our extended message IDs. Peers will use these values to
- // select which extension a message is intended for.
+ // Arbitrary maximum of "metadata_size" (see https://www.bittorrent.org/beps/bep_0009.html)
+ // libtorrent-rasterbar uses 4MiB at last check. TODO: Add links to values used by other
+ // implementations here. I saw 14143527 in the metainfo for
+ // 3597f16e239aeb8f8524a1a1c4e4725a0a96b470. Large values for legitimate torrents should be
+ // recorded here for consideration.
+ maxMetadataSize uint32 = 16 * 1024 * 1024
+)
+
+// These are our extended message IDs. Peers will use these values to
+// select which extension a message is intended for.
+const (