httpserver

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountBean

type AccountBean struct {
	Signer           string `json:"signer"`
	Slots            int64  `json:"slots"`
	BeneficiaryBonus int64  `json:"beneficiaryBonus"`
	Beneficiary      string `json:"beneficiary"`
	BlsKeyString     string `json:"blsKeyString"`
}

type AccountMapData

type AccountMapData struct {
	MapList map[string]AccountBean `json:"accountmaplist"`
}

type BaseServer

type BaseServer struct {
	HttpServer *http.Server
}

func NewBaseServer

func NewBaseServer(strategy *emtTypes.Strategy, backend *ethereum.Backend) *BaseServer

type Encourage

type Encourage struct {
	TotalBalance          *big.Int `json:"initialTotalBalance"`
	EncourageAverageBlock *big.Int `json:"encourageAverageBlock"`
}

type HandlersFunc

type HandlersFunc func(http.ResponseWriter, *http.Request)

type PTableAll

type PTableAll struct {
	NextCandidateValidators []*Validator `json:"next_validators"`

	AccountMapList map[string]common.Address `json:"account_map"`

	PosItemMap map[common.Address]*txfilter.PosItem `json:"pos_table_map"`

	Success bool `json:"success"`
}

type PosItemMapData

type PosItemMapData struct {
	PosItemMap map[common.Address]*txfilter.PosItem `json:"pos_table_map"`
	Threshold  *big.Int                             `json:"threshold"`
	TotalSlots int64                                `json:"total_slots"`
}

type PreBlockProposer

type PreBlockProposer struct {
	PreBlockProposer string         `json:"proposer"`
	Beneficiary      common.Address `json:"beneficiary"`
	Signer           common.Address `json:"signer"`
}

type PreBlockValidatorElect

type PreBlockValidatorElect struct {
	PreBlockValidators []*Validator `json:"preBlockValidators"`
}

type THandler

type THandler struct {
	HandlersMap map[string]HandlersFunc
	// contains filtered or unexported fields
}

func NewTHandler

func NewTHandler(strategy *emtTypes.Strategy, backend *ethereum.Backend) *THandler

func (*THandler) GetAccountMapData

func (tHandler *THandler) GetAccountMapData(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetAllCandidateValidatorPool

func (tHandler *THandler) GetAllCandidateValidatorPool(w http.ResponseWriter, req *http.Request)

func (*THandler) GetAuthTable added in v1.4.5

func (tHandler *THandler) GetAuthTable(w http.ResponseWriter, req *http.Request)

func (*THandler) GetEncourage

func (tHandler *THandler) GetEncourage(w http.ResponseWriter, req *http.Request)

func (*THandler) GetInitialValidator

func (tHandler *THandler) GetInitialValidator(w http.ResponseWriter, req *http.Request)

func (*THandler) GetNextAccountMapData

func (tHandler *THandler) GetNextAccountMapData(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetNextAllCandidateValidatorPool

func (tHandler *THandler) GetNextAllCandidateValidatorPool(w http.ResponseWriter, req *http.Request)

func (*THandler) GetNextPosTableData

func (tHandler *THandler) GetNextPosTableData(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetPosTableData

func (tHandler *THandler) GetPosTableData(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetPreBlockProposer

func (tHandler *THandler) GetPreBlockProposer(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetPreBlockUpdateValidators

func (tHandler *THandler) GetPreBlockUpdateValidators(w http.ResponseWriter, req *http.Request)

This function will return the used data structure

func (*THandler) GetTxPoolEventSize

func (tHandler *THandler) GetTxPoolEventSize(w http.ResponseWriter, req *http.Request)

func (*THandler) Hello

func (tHandler *THandler) Hello(w http.ResponseWriter, req *http.Request)

func (*THandler) RegisterFunc

func (tHandler *THandler) RegisterFunc()

func (*THandler) ServeHTTP

func (tHandler *THandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Validator

type Validator struct {
	//Address       []byte           `json:"address"`
	PubKey        abciTypes.PubKey `json:"pubKey"`
	Power         int64            `json:"power"`
	AddressString string           `json:"addressString"`
	Signer        common.Address   `json:"signer"`
	Slots         int64            `json:"slots"`
	Beneficiary   common.Address   `json:"beneficiary"`
	BlsKeyString  string           `json:"blsKeyString"`
}

Jump to

Keyboard shortcuts

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