kernel

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: GPL-3.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Types

type Kernel

type Kernel struct {
	RunMode RunMode

	*ChainEnv

	Land *Land
	// contains filtered or unexported fields
}

func NewKernel

func NewKernel(
	cfg *KernelConf,
	env *ChainEnv,
	land *Land,
) *Kernel

func (*Kernel) AcceptUnpkgTxns

func (k *Kernel) AcceptUnpkgTxns() error

func (*Kernel) CheckReplayAttack

func (k *Kernel) CheckReplayAttack(txn *SignedTxn) bool

func (*Kernel) GetReceipts

func (k *Kernel) GetReceipts(ctx *gin.Context)

func (*Kernel) GetReceiptsCount

func (k *Kernel) GetReceiptsCount(ctx *gin.Context)

func (*Kernel) GetTripodInstance

func (k *Kernel) GetTripodInstance(name string) any

func (*Kernel) GetTxn

func (k *Kernel) GetTxn(txnHash Hash) (txn *SignedTxn, err error)

func (*Kernel) HandleError

func (k *Kernel) HandleError(err error, ctx *context.WriteContext, block *Block, stxn *SignedTxn) *Receipt

func (*Kernel) HandleEvent

func (k *Kernel) HandleEvent(ctx *context.WriteContext, block *Block, stxn *SignedTxn) *Receipt

func (*Kernel) HandleHttp

func (k *Kernel) HandleHttp()

func (*Kernel) HandleRead

func (k *Kernel) HandleRead(rdCall *common.RdCall) (*context.ResponseData, error)

func (*Kernel) HandleReceipt

func (k *Kernel) HandleReceipt(ctx *context.WriteContext, receipt *Receipt, block *Block, stxn *SignedTxn)

func (*Kernel) HandleTxn

func (k *Kernel) HandleTxn(signedWrCall *protocol.SignedWrCall) error

HandleTxn handles txn from outside. You can also self-define your input by calling HandleTxn (not only by default http and ws)

func (*Kernel) HandleWS

func (k *Kernel) HandleWS()

func (*Kernel) InitBlockChain

func (k *Kernel) InitBlockChain()

func (*Kernel) LocalRun

func (k *Kernel) LocalRun() (newBlock *Block, err error)

func (*Kernel) MasterWorkerRun

func (k *Kernel) MasterWorkerRun() error

func (*Kernel) OrderedExecute

func (k *Kernel) OrderedExecute(block *Block) error

func (*Kernel) PostExecute

func (k *Kernel) PostExecute(block *Block, receipts map[Hash]*Receipt) error

func (*Kernel) Run

func (k *Kernel) Run()

func (*Kernel) Startup

func (k *Kernel) Startup()

func (*Kernel) Stop

func (k *Kernel) Stop()

func (*Kernel) WithExecuteFn

func (k *Kernel) WithExecuteFn(fn ExecuteFn)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL