correct the change of message size limit

This commit is contained in:
wangchao 2021-06-09 15:19:35 +08:00
parent 4bff4f25ad
commit 4c87818de1
2 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ func (mp *MessagePool) checkMessages(msgs []*types.Message, interned bool, flexi
},
}
if len(bytes) > 32*1024-128 { // 128 bytes to account for signature size
if len(bytes) > MaxMessageSize-128 { // 128 bytes to account for signature size
check.OK = false
check.Err = "message too big"
} else {

View File

@ -557,7 +557,7 @@ func (mv *MessageValidator) validateLocalMessage(ctx context.Context, msg *pubsu
return pubsub.ValidationIgnore
}
if m.Size() > 32*1024 {
if m.Size() > messagepool.MaxMessageSize {
log.Warnf("local message is too large! (%dB)", m.Size())
recordFailure(ctx, metrics.MessageValidationFailure, "oversize")
return pubsub.ValidationIgnore