aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/stopper.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/test/stopper.go')
-rw-r--r--core/test/stopper.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/test/stopper.go b/core/test/stopper.go
index abc93c3..40868d8 100644
--- a/core/test/stopper.go
+++ b/core/test/stopper.go
@@ -61,7 +61,7 @@ func (s *StopByConfirmedBlocks) ShouldStop(nID types.NodeID) bool {
lastChecked := s.lastCheckDelivered[nID]
currentConfirmedBlocks := s.confirmedBlocks[nID]
db := s.dbs[nID]
- s.apps[nID].Check(func(app *App) {
+ s.apps[nID].WithLock(func(app *App) {
for _, h := range app.DeliverSequence[lastChecked:] {
b, err := db.Get(h)
if err != nil {
@@ -116,7 +116,7 @@ func (s *StopByRound) ShouldStop(nID types.NodeID) bool {
if curRound := s.currentRounds[nID]; curRound < s.untilRound {
lastChecked := s.lastCheckDelivered[nID]
db := s.dbs[nID]
- s.apps[nID].Check(func(app *App) {
+ s.apps[nID].WithLock(func(app *App) {
for _, h := range app.DeliverSequence[lastChecked:] {
b, err := db.Get(h)
if err != nil {