mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-17 21:32:56 +01:00
negentropy: default frameSizeLimit to basically infinite.
This commit is contained in:
parent
1e4e91f257
commit
4c9ab850a5
@ -30,6 +30,12 @@ type Negentropy struct {
|
||||
}
|
||||
|
||||
func NewNegentropy(storage Storage, frameSizeLimit int) *Negentropy {
|
||||
if frameSizeLimit == 0 {
|
||||
frameSizeLimit = math.MaxInt
|
||||
} else if frameSizeLimit < 4096 {
|
||||
panic(fmt.Errorf("frameSizeLimit can't be smaller than 4096, was %d", frameSizeLimit))
|
||||
}
|
||||
|
||||
return &Negentropy{
|
||||
storage: storage,
|
||||
frameSizeLimit: frameSizeLimit,
|
||||
|
Loading…
x
Reference in New Issue
Block a user