]> Sergey Matveev's repositories - btrtrc.git/blobdiff - global.go
Clarify maximum value of "metadata_size" (#609)
[btrtrc.git] / global.go
index e06d93230428a2ac08c5538a0ea09821492386cc..4e48d0c550ea9eb5881ba2e60a1d29824764f68c 100644 (file)
--- a/global.go
+++ b/global.go
@@ -10,6 +10,10 @@ import (
 const (
        pieceHash        = crypto.SHA1
        defaultChunkSize = 0x4000 // 16KiB
+       
+       // Arbitrary maximum of "metadata_size" (see https://www.bittorrent.org/beps/bep_0009.html)
+       // This value is 2x what libtorrent-rasterbar uses, which should be plenty
+       maxMetadataSize uint32 = 8*1024*1024
 )
 
 // These are our extended message IDs. Peers will use these values to