Reverted increased test timeout

This commit is contained in:
Jasmina Malicevic
2022-05-24 11:13:39 +02:00
parent dc4d7eac9b
commit f8d3bf8e6d
2 changed files with 9 additions and 2 deletions

View File

@@ -577,7 +577,14 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh
// TODO(sergio, jmalicevic): Should we also validate against the extended commit?
if r.lastTrustedBlock.block == nil {
if state.LastBlockHeight != 0 {
r.lastTrustedBlock = &TrustedBlockData{r.store.LoadBlock(state.LastBlockHeight), r.store.LoadSeenCommit()}
seenCommit := r.store.LoadSeenCommit()
if seenCommit.Height != state.LastBlockHeight || !seenCommit.BlockID.Equals(state.LastBlockID) {
panic(" The last commit is not corresponding to the last existing height")
}
r.lastTrustedBlock = &TrustedBlockData{r.store.LoadBlock(state.LastBlockHeight), seenCommit}
if r.lastTrustedBlock.block == nil {
panic("Failed to load last trusted block")
}

View File

@@ -481,7 +481,7 @@ func TestReactor_NonGenesisSync(t *testing.T) {
}
return matching
},
30*time.Second,
10*time.Second,
10*time.Millisecond,
"expected node to be partially synced",
)