Merge pull request #2169 from waynewyang/evnet
set called 'true' after handle be called
This commit is contained in:
commit
39d609a661
@ -93,7 +93,6 @@ func (e *heightEvents) headChangeAt(rev, app []*types.TipSet) error {
|
|||||||
if hnd.called {
|
if hnd.called {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
hnd.called = true
|
|
||||||
|
|
||||||
triggerH := h - abi.ChainEpoch(hnd.confidence)
|
triggerH := h - abi.ChainEpoch(hnd.confidence)
|
||||||
|
|
||||||
@ -108,6 +107,7 @@ func (e *heightEvents) headChangeAt(rev, app []*types.TipSet) error {
|
|||||||
e.lk.Unlock()
|
e.lk.Unlock()
|
||||||
err = handle(ctx, incTs, h)
|
err = handle(ctx, incTs, h)
|
||||||
e.lk.Lock()
|
e.lk.Lock()
|
||||||
|
hnd.called = true
|
||||||
span.End()
|
span.End()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user