Skip to content

Commit

Permalink
fixing view change (#427)
Browse files Browse the repository at this point in the history
* fixing view change

Signed-off-by: Hagar Meir <[email protected]>

* test view data

Signed-off-by: Hagar Meir <[email protected]>

* test new view

Signed-off-by: Hagar Meir <[email protected]>

* after review

Signed-off-by: Hagar Meir <[email protected]>

* update protos

Signed-off-by: Hagar Meir <[email protected]>

* change comment
  • Loading branch information
HagarMeir authored Mar 3, 2020
1 parent 964c4ac commit f2a2545
Show file tree
Hide file tree
Showing 6 changed files with 871 additions and 286 deletions.
6 changes: 3 additions & 3 deletions internal/bft/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func MsgToString(m *protos.Message) string {
case *protos.Message_NewView:
return newViewToString(m.GetNewView())
case *protos.Message_ViewData:
return viewDataToString(m.GetViewData())
return signedViewDataToString(m.GetViewData())
case *protos.Message_HeartBeat:
return heartBeatToString(m.GetHeartBeat())
case *protos.Message_HeartBeatResponse:
Expand Down Expand Up @@ -288,7 +288,7 @@ func newViewToString(nv *protos.NewView) string {
buff := bytes.Buffer{}
buff.WriteString("< NewView with ")
for i, svd := range nv.SignedViewData {
buff.WriteString(viewDataToString(svd))
buff.WriteString(signedViewDataToString(svd))
if i == len(nv.SignedViewData)-1 {
break
}
Expand All @@ -298,7 +298,7 @@ func newViewToString(nv *protos.NewView) string {
return buff.String()
}

func viewDataToString(svd *protos.SignedViewData) string {
func signedViewDataToString(svd *protos.SignedViewData) string {
if svd == nil {
return "empty ViewData"
}
Expand Down
Loading

0 comments on commit f2a2545

Please sign in to comment.