Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wire: Fix a few messageError string typos. #1840

Merged
merged 1 commit into from
Aug 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
wire: Fix a few messageError string copy/paste errors.
aarcamp committed Aug 17, 2019
commit cd5673bdbd8bc50ba0149249f214c6ee6efcd99f
2 changes: 1 addition & 1 deletion wire/msgcfilter.go
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ func (msg *MsgCFilter) BtcEncode(w io.Writer, pver uint32) error {
if pver < NodeCFVersion {
str := fmt.Sprintf("cfilter message invalid for protocol "+
"version %d", pver)
return messageError("MsgCFHeaders.BtcEncode", str)
return messageError("MsgCFilter.BtcEncode", str)
}

size := len(msg.Data)
8 changes: 4 additions & 4 deletions wire/msggetcfheaders.go
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ func (msg *MsgGetCFHeaders) BtcDecode(r io.Reader, pver uint32) error {
if pver < NodeCFVersion {
str := fmt.Sprintf("getcfheaders message invalid for protocol "+
"version %d", pver)
return messageError("MsgCFHeaders.BtcDecode", str)
return messageError("MsgGetCFHeaders.BtcDecode", str)
}

// Read num block locator hashes and limit to max.
@@ -51,7 +51,7 @@ func (msg *MsgGetCFHeaders) BtcDecode(r io.Reader, pver uint32) error {
if count > MaxBlockLocatorsPerMsg {
str := fmt.Sprintf("too many block locator hashes for message "+
"[count %v, max %v]", count, MaxBlockLocatorsPerMsg)
return messageError("MsgGetHeaders.BtcDecode", str)
return messageError("MsgGetCFHeaders.BtcDecode", str)
}

// Create a contiguous slice of hashes to deserialize into in order to
@@ -81,15 +81,15 @@ func (msg *MsgGetCFHeaders) BtcEncode(w io.Writer, pver uint32) error {
if pver < NodeCFVersion {
str := fmt.Sprintf("getcfheaders message invalid for protocol "+
"version %d", pver)
return messageError("MsgCFHeaders.BtcEncode", str)
return messageError("MsgGetCFHeaders.BtcEncode", str)
}

// Limit to max block locator hashes per message.
count := len(msg.BlockLocatorHashes)
if count > MaxBlockLocatorsPerMsg {
str := fmt.Sprintf("too many block locator hashes for message "+
"[count %v, max %v]", count, MaxBlockLocatorsPerMsg)
return messageError("MsgGetHeaders.BtcEncode", str)
return messageError("MsgGetCFHeaders.BtcEncode", str)
}

err := WriteVarInt(w, pver, uint64(count))