Skip to content

Commit

Permalink
msg err
Browse files Browse the repository at this point in the history
  • Loading branch information
imerkle committed Jul 28, 2021
1 parent 44ac930 commit c113ea3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion types/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func MessageDeserialize(messageData []byte) (Message, error) {
}
*list[i] = uint8(t)
}

accountCount, err := parseUvarint(&messageData)
if len(messageData) < int(accountCount)*32 {
return Message{}, errors.New("parse account error")
Expand Down
4 changes: 3 additions & 1 deletion types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ func TransactionDeserialize(tx []byte) (Transaction, error) {
}

message, err := MessageDeserialize(tx)

if err != nil {
return Transaction{}, err
}
if uint64(message.Header.NumRequireSignatures) != signatureCount {
return Transaction{}, errors.New("numRequireSignatures is not equal to signatureCount")
}
Expand Down

0 comments on commit c113ea3

Please sign in to comment.