Skip to content

Commit

Permalink
fixed nil pointer on String() method (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko authored Dec 3, 2023
1 parent b8d526d commit f3aad28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tss/party.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ func (p *BaseParty) ValidateMessage(msg ParsedMessage) (bool, *Error) {
}

func (p *BaseParty) String() string {
return fmt.Sprintf("round: %d", p.round().RoundNumber())
if rnd := p.round(); rnd != nil {
return fmt.Sprintf("round: %d",rnd.RoundNumber())
}

return "No more rounds"
}

// -----
Expand Down

0 comments on commit f3aad28

Please sign in to comment.