relab/hotstuff

Synchronizer problem

Closed this issue · 1 comments

I have some problem in synchronizer/synchronizer.go

func (s *Synchronizer) AdvanceView(syncInfo consensus.SyncInfo) {
	v := consensus.View(0)
	timeout := false

	// check for a TC
	if tc, ok := syncInfo.TC(); ok {
		if !s.mods.Crypto().VerifyTimeoutCert(tc) {
			s.mods.Logger().Info("Timeout Certificate could not be verified!")
			return
		}
		if v > s.highTC.View() {
			s.highTC = tc
		}

		v = tc.View()
		timeout = true
	}

I think v is always 0 when compare to s.highTC.View()
shuold we put v = tc.View() before that?

Thanks for spotting this mistake!