chain events: NoTimeout const
This commit is contained in:
parent
611ea02cea
commit
59fb84e77e
@ -10,6 +10,8 @@ import (
|
|||||||
"github.com/filecoin-project/go-lotus/chain/types"
|
"github.com/filecoin-project/go-lotus/chain/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const NoTimeout = math.MaxUint64
|
||||||
|
|
||||||
type triggerId = uint64
|
type triggerId = uint64
|
||||||
|
|
||||||
// msgH is the block height at which a message was present / event has happened
|
// msgH is the block height at which a message was present / event has happened
|
||||||
@ -271,7 +273,7 @@ func (e *calledEvents) Called(check CheckFunc, hnd CalledHandler, rev RevertHand
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if done {
|
if done {
|
||||||
timeout = math.MaxUint64
|
timeout = NoTimeout
|
||||||
}
|
}
|
||||||
|
|
||||||
id := e.ctr
|
id := e.ctr
|
||||||
@ -293,7 +295,7 @@ func (e *calledEvents) Called(check CheckFunc, hnd CalledHandler, rev RevertHand
|
|||||||
}
|
}
|
||||||
|
|
||||||
e.callTuples[ct] = append(e.callTuples[ct], id)
|
e.callTuples[ct] = append(e.callTuples[ct], id)
|
||||||
if timeout != math.MaxUint64 {
|
if timeout != NoTimeout {
|
||||||
if e.timeouts[timeout+uint64(confidence)] == nil {
|
if e.timeouts[timeout+uint64(confidence)] == nil {
|
||||||
e.timeouts[timeout+uint64(confidence)] = map[uint64]int{}
|
e.timeouts[timeout+uint64(confidence)] = map[uint64]int{}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user