From ec8885ff792bcd79fcbe753bf9f472f7f5332b27 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 21 Nov 2023 20:58:09 +0000 Subject: [PATCH] wire-mix: more maximums in err msgs --- wire/msgmixct.go | 3 ++- wire/msgmixdc.go | 3 ++- wire/msgmixke.go | 3 ++- wire/msgmixsr.go | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/wire/msgmixct.go b/wire/msgmixct.go index 595839b32f..c48fecf4af 100644 --- a/wire/msgmixct.go +++ b/wire/msgmixct.go @@ -111,7 +111,8 @@ func (msg *MsgMixCT) writeMessageNoSignature(op string, w io.Writer, pver uint32 return messageError(op, ErrInvalidMsg, msg) } if count > MaxPrevMixMsgs { - msg := fmt.Sprintf("too many previous referenced messages [%v]", count) + msg := fmt.Sprintf("too many previous referenced messages [count %v, max %v]", + count, MaxPrevMixMsgs) return messageError(op, ErrTooManyPrevMixMsgs, msg) } diff --git a/wire/msgmixdc.go b/wire/msgmixdc.go index 0835aac79f..30f6dd812d 100644 --- a/wire/msgmixdc.go +++ b/wire/msgmixdc.go @@ -135,7 +135,8 @@ func (msg *MsgMixDC) writeMessageNoSignature(op string, w io.Writer, pver uint32 count := len(msg.SeenSRs) if count > MaxPrevMixMsgs { - msg := fmt.Sprintf("too many previous referenced messages [%v]", count) + msg := fmt.Sprintf("too many previous referenced messages [count %v, max %v]", + count, MaxPrevMixMsgs) return messageError(op, ErrTooManyPrevMixMsgs, msg) } diff --git a/wire/msgmixke.go b/wire/msgmixke.go index ea973ad526..e35656de89 100644 --- a/wire/msgmixke.go +++ b/wire/msgmixke.go @@ -107,7 +107,8 @@ func (msg *MsgMixKE) writeMessageNoSignature(op string, w io.Writer, pver uint32 // Limit to max previous messages hashes. count := len(msg.SeenPRs) if count > MaxPrevMixMsgs { - msg := fmt.Sprintf("too many previous referenced messages [%v]", count) + msg := fmt.Sprintf("too many previous referenced messages [count %v, max %v]", + count, MaxPrevMixMsgs) return messageError(op, ErrTooManyPrevMixMsgs, msg) } diff --git a/wire/msgmixsr.go b/wire/msgmixsr.go index 7a6a7117a4..3db07fdadd 100644 --- a/wire/msgmixsr.go +++ b/wire/msgmixsr.go @@ -196,7 +196,8 @@ func (msg *MsgMixSR) writeMessageNoSignature(op string, w io.Writer, pver uint32 count := len(msg.SeenCTs) if count > MaxPrevMixMsgs { - msg := fmt.Sprintf("too many previous referenced messages [%v]", count) + msg := fmt.Sprintf("too many previous referenced messages [count %v, max %v]", + count, MaxPrevMixMsgs) return messageError(op, ErrTooManyPrevMixMsgs, msg) }