Documentation ¶
Index ¶
Constants ¶
const NoHeight = abi.ChainEpoch(-1)
const NoTimeout = math.MaxInt64
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckFunc ¶
CheckFunc is used for atomicity guarantees. If the condition the callbacks wait for has already happened in tipset `ts`
If `done` is true, timeout won't be triggered If `more` is false, no messages will be sent to EventHandler (RevertHandler
may still be called)
type EventHandler ¶ added in v0.4.1
type EventHandler func(data eventData, prevTs, ts *types.TipSet, curH abi.ChainEpoch) (more bool, err error)
EventHandler arguments: `prevTs` is the previous tipset, eg the "from" tipset for a state change. `ts` is the event tipset, eg the tipset in which the `msg` is included. `curH`-`ts.Height` = `confidence`
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
func (*Events) ChainAt ¶
func (e *Events) ChainAt(hnd HeightHandler, rev RevertHandler, confidence int, h abi.ChainEpoch) error
ChainAt invokes the specified `HeightHandler` when the chain reaches the specified height+confidence threshold. If the chain is rolled-back under the specified height, `RevertHandler` will be called.
ts passed to handlers is the tipset at the specified, or above, if lower tipsets were null
type HeightHandler ¶
HeightHandler `curH`-`ts.Height` = `confidence`
type MsgHandler ¶ added in v0.4.1
type MsgHandler func(msg *types.Message, rec *types.MessageReceipt, ts *types.TipSet, curH abi.ChainEpoch) (more bool, err error)
MsgHandler arguments: `ts` is the tipset, in which the `msg` is included. `curH`-`ts.Height` = `confidence`
type MsgMatchFunc ¶ added in v0.4.1
type RevertHandler ¶
HeightHandler `curH`-`ts.Height` = `confidence`
type StateChange ¶ added in v0.4.1
type StateChange interface{}
StateChange represents a change in state
type StateChangeHandler ¶ added in v0.4.1
type StateChangeHandler func(oldTs, newTs *types.TipSet, states StateChange, curH abi.ChainEpoch) (more bool, err error)
StateChangeHandler arguments: `oldTs` is the state "from" tipset `newTs` is the state "to" tipset `states` is the change in state `curH`-`ts.Height` = `confidence`
type StateMatchFunc ¶ added in v0.4.1
type StateMatchFunc func(oldTs, newTs *types.TipSet) (bool, StateChange, error)