Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface { // Init returns the app configuration. Init() (*AppConfig, error) // ShouldExecute determines if L1 should execute or should skip this block. // This is where the app should pull accounts with the light client. ShouldExecute(*AppContext) (bool, error) // Execute returns a list of transactions that should be executed. Execute(*AppContext) ([]*protocol.Transaction, error) }
type AppContext ¶
type Context ¶
type Context struct { AppContext Executor *Executor Validator bool Leader bool Actions []*protocol.Transaction Pending map[[32]byte]*protocol.Transaction BlockHash [32]byte Attempts int ProtocolVersion protocol.ExecutorVersion }
type DidInitiateTxn ¶
type DidInitiateTxn struct{}
type DidSignTxn ¶
type DidSignTxn struct{}
type ExecuteApp ¶
type ExecuteApp struct{}
type FatalError ¶
type FatalError struct{}
type InitiateTxn ¶
type InitiateTxn struct{}
type SelectLeader ¶
type SelectLeader struct{}
type State ¶
type State int
const StateBegin State = 1
StateBegin .
const StateDidInitiateTxn State = 5
StateDidInitiateTxn .
const StateDidSignTxn State = 7
StateDidSignTxn .
const StateExecuteApp State = 3
StateExecuteApp .
const StateFatalError State = 201
StateFatalError .
const StateInitiateTxn State = 4
StateInitiateTxn .
const StateReset State = 8
StateReset .
const StateSelectLeader State = 2
StateSelectLeader .
const StateSignTxn State = 6
StateSignTxn .
const StateTryAgainError State = 202
StateTryAgainError .
func (State) GetEnumValue ¶
GetEnumValue returns the value of the State
func (State) MarshalJSON ¶
MarshalJSON marshals the State to JSON as a string.
func (*State) SetEnumValue ¶
SetEnumValue sets the value. SetEnumValue returns false if the value is invalid.
func (*State) UnmarshalJSON ¶
UnmarshalJSON unmarshals the State from JSON as a string.
type TryAgainError ¶
type TryAgainError struct{}
Click to show internal directories.
Click to hide internal directories.