store: use correct vars for loop in assertions

pull/89/head
Wilmer Paulino 5 years ago
parent fa1b86c691
commit 9f25fdd0bb
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F

@ -170,8 +170,8 @@ func (s *storeMock) UpdateLoopIn(hash lntypes.Hash, time time.Time,
} }
updates = append(updates, state) updates = append(updates, state)
s.loopOutUpdates[hash] = updates s.loopInUpdates[hash] = updates
s.loopOutUpdateChan <- state s.loopInUpdateChan <- state
return nil return nil
} }
@ -214,9 +214,9 @@ func (s *storeMock) assertLoopInStored() {
func (s *storeMock) assertLoopInState(expectedState loopdb.SwapState) { func (s *storeMock) assertLoopInState(expectedState loopdb.SwapState) {
s.t.Helper() s.t.Helper()
state := <-s.loopOutUpdateChan state := <-s.loopInUpdateChan
if state.State != expectedState { if state.State != expectedState {
s.t.Fatalf("unexpected state") s.t.Fatalf("expected state %v, got %v", expectedState, state)
} }
} }

Loading…
Cancel
Save