app

package
v1.2.1-patch5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmountStrategy

type AmountStrategy interface {
	// contains filtered or unexported methods
}

type BurnStrategy

type BurnStrategy struct {
}

type EthermintApplication

type EthermintApplication struct {

	// select count
	SelectCount int64

	// select change block number
	SelectBlockNumber int64

	//select Strategy in the test
	SelectStrategy bool
	// contains filtered or unexported fields
}

EthermintApplication implements an ABCI application #stable - 0.4.0

func NewEthermintApplication

func NewEthermintApplication(backend *ethereum.Backend,
	client *rpc.Client, strategy *emtTypes.Strategy) (*EthermintApplication, error)

NewEthermintApplication creates a fully initialised instance of EthermintApplication #stable - 0.4.0

func (*EthermintApplication) BeginBlock

BeginBlock starts a new Ethereum block #stable - 0.4.0

func (*EthermintApplication) CheckTx

func (app *EthermintApplication) CheckTx(txBytes []byte) abciTypes.ResponseCheckTx

CheckTx checks a transaction is valid but does not mutate the state #stable - 0.4.0

func (*EthermintApplication) CollectTx

func (app *EthermintApplication) CollectTx(tx *types.Transaction)

CollectTx invokes CollectTx on the strategy #unstable

func (*EthermintApplication) Commit

Commit commits the block and returns a hash of the current state #stable - 0.4.0

func (*EthermintApplication) DeliverTx

func (app *EthermintApplication) DeliverTx(txBytes []byte) abciTypes.ResponseDeliverTx

DeliverTx executes a transaction against the latest state #stable - 0.4.0

func (*EthermintApplication) EndBlock

EndBlock accumulates rewards for the validators and updates them #stable - 0.4.0

func (*EthermintApplication) GetLogger

func (app *EthermintApplication) GetLogger() tmLog.Logger

func (*EthermintApplication) GetStrategy

func (app *EthermintApplication) GetStrategy() *emtTypes.Strategy

func (*EthermintApplication) GetUpdatedValidators

func (app *EthermintApplication) GetUpdatedValidators(height int64, seed []byte) abciTypes.ResponseEndBlock

GetUpdatedValidators returns an updated validator set from the strategy #unstable

func (*EthermintApplication) Info

func (*EthermintApplication) InitChain

InitChain initializes the validator set #stable - 0.4.0

func (*EthermintApplication) InitPersistData

func (app *EthermintApplication) InitPersistData() bool

func (*EthermintApplication) Query

Query queries the state of the EthermintApplication #stable - 0.4.0

func (*EthermintApplication) Receiver

func (app *EthermintApplication) Receiver() common.Address

Receiver returns the receiving address based on the selected strategy #unstable

func (*EthermintApplication) SetLogger

func (app *EthermintApplication) SetLogger(log tmLog.Logger)

SetLogger sets the logger for the gelchain application #unstable

func (*EthermintApplication) SetOption

SetOption sets a configuration option #stable - 0.4.0

func (*EthermintApplication) SetPersistenceData

func (app *EthermintApplication) SetPersistenceData()

func (*EthermintApplication) SetPosTableThreshold

func (app *EthermintApplication) SetPosTableThreshold()

func (*EthermintApplication) SetValidators

func (app *EthermintApplication) SetValidators(validators []abciTypes.ValidatorUpdate)

SetValidators sets new validators on the strategy #unstable

func (*EthermintApplication) StartHttpServer

func (app *EthermintApplication) StartHttpServer()

func (*EthermintApplication) UpsertPosItemInit

func (app *EthermintApplication) UpsertPosItemInit(account common.Address, balance *big.Int, beneficiary common.Address,
	pubKey abciTypes.PubKey, blsKeyString string) error

type FixedAmountStrategy

type FixedAmountStrategy struct {
	// contains filtered or unexported fields
}

type MockIApp

type MockIApp struct {
	// contains filtered or unexported fields
}

MockIApp is a mock of IApp interface

func NewMockIApp

func NewMockIApp(ctrl *gomock.Controller) *MockIApp

NewMockIApp creates a new mock instance

func (*MockIApp) EXPECT

func (m *MockIApp) EXPECT() *MockIAppMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockIApp) GetAccountMap

func (m *MockIApp) GetAccountMap(arg0 string) *types.AccountMap

GetAccountMap mocks base method

func (*MockIApp) RemoveValidatorTx

func (m *MockIApp) RemoveValidatorTx(arg0 common.Address) (bool, error)

RemoveValidatorTx mocks base method

type MockIAppMockRecorder

type MockIAppMockRecorder struct {
	// contains filtered or unexported fields
}

MockIAppMockRecorder is the mock recorder for MockIApp

func (*MockIAppMockRecorder) GetAccountMap

func (mr *MockIAppMockRecorder) GetAccountMap(arg0 interface{}) *gomock.Call

GetAccountMap indicates an expected call of GetAccountMap

func (*MockIAppMockRecorder) RemoveValidatorTx

func (mr *MockIAppMockRecorder) RemoveValidatorTx(arg0 interface{}) *gomock.Call

RemoveValidatorTx indicates an expected call of RemoveValidatorTx

type Percent100AmountStrategy

type Percent100AmountStrategy struct {
}

type Punishment

type Punishment struct {
	AmountStrategy     AmountStrategy
	SubBalanceStrategy SubBalanceStrategy
}

func NewPunishment

func NewPunishment(as AmountStrategy, ss SubBalanceStrategy) *Punishment

func (*Punishment) DoPunish

func (p *Punishment) DoPunish(stateDB *state.StateDB, strategy *types.Strategy, evidences []abciTypes.Evidence, proposerAddress []byte, currentHeight int64)

func (*Punishment) Punish

func (p *Punishment) Punish(stateDB *state.StateDB, byzantine common.Address) error

type SubBalanceStrategy

type SubBalanceStrategy interface {
	// contains filtered or unexported methods
}

type TransferStrategy

type TransferStrategy struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package mock_log is a generated GoMock package.
Package mock_log is a generated GoMock package.

Jump to

Keyboard shortcuts

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