diff options
Diffstat (limited to 'core/agreement.go')
-rw-r--r-- | core/agreement.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/agreement.go b/core/agreement.go index f31b7ef..8d47a87 100644 --- a/core/agreement.go +++ b/core/agreement.go @@ -250,6 +250,14 @@ func (a *agreement) agreementID() types.Position { // nextState is called at the specific clock time. func (a *agreement) nextState() (err error) { + if func() bool { + a.lock.RLock() + defer a.lock.RUnlock() + return a.hasOutput + }() { + a.state = newSleepState(a.data) + return + } a.state, err = a.state.nextState() return } |