diff --git a/protocol/PROTOCOL.md b/protocol/PROTOCOL.md index cfd15d565..420d332d8 100644 --- a/protocol/PROTOCOL.md +++ b/protocol/PROTOCOL.md @@ -575,7 +575,7 @@ restrictive than the following: ### Index and Index Update Messages - Repository: 64 bytes - - Number of Files: 100.000 + - Number of Files: 1.000.000 - Name: 1024 bytes - Number of Blocks: 100.000 - Hash: 64 bytes diff --git a/protocol/message_types.go b/protocol/message_types.go index a70ad9b6f..7ef9a7ff3 100644 --- a/protocol/message_types.go +++ b/protocol/message_types.go @@ -2,7 +2,7 @@ package protocol type IndexMessage struct { Repository string // max:64 - Files []FileInfo // max:100000 + Files []FileInfo // max:1000000 } type FileInfo struct { diff --git a/protocol/message_xdr.go b/protocol/message_xdr.go index 3af3b4357..ede335d9d 100644 --- a/protocol/message_xdr.go +++ b/protocol/message_xdr.go @@ -24,7 +24,7 @@ func (o IndexMessage) encodeXDR(xw *xdr.Writer) (int, error) { return xw.Tot(), xdr.ErrElementSizeExceeded } xw.WriteString(o.Repository) - if len(o.Files) > 100000 { + if len(o.Files) > 1000000 { return xw.Tot(), xdr.ErrElementSizeExceeded } xw.WriteUint32(uint32(len(o.Files))) @@ -48,7 +48,7 @@ func (o *IndexMessage) UnmarshalXDR(bs []byte) error { func (o *IndexMessage) decodeXDR(xr *xdr.Reader) error { o.Repository = xr.ReadStringMax(64) _FilesSize := int(xr.ReadUint32()) - if _FilesSize > 100000 { + if _FilesSize > 1000000 { return xdr.ErrElementSizeExceeded } o.Files = make([]FileInfo, _FilesSize)