proc

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: LGPL-3.0 Imports: 27 Imported by: 11

Documentation

Overview

Package proc provides functions for handle messages from consensus/ledger/net/http/validators

  • Copyright (C) 2018 The ontology Authors
  • This file is part of The ontology library. *
  • The ontology is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Lesser General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • The ontology is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Lesser General Public License for more details. *
  • You should have received a copy of the GNU Lesser General Public License
  • along with The ontology. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TXPoolServer

type TXPoolServer struct {
	Net p2p.P2P
	// contains filtered or unexported fields
}

TXPoolServer contains all api to external modules

func NewTxPoolServer

func NewTxPoolServer(disablePreExec, disableBroadcastNetTx bool) *TXPoolServer

NewTxPoolServer creates a new tx pool server to schedule workers to handle and filter inbound transactions from the network, http, and consensus.

func (*TXPoolServer) CurrentNonce added in v1.14.1

func (s *TXPoolServer) CurrentNonce(addr common.Address) uint64

func (*TXPoolServer) GetGasPrice added in v1.14.1

func (s *TXPoolServer) GetGasPrice() uint64

GetGasPrice returns the current gas price enforced by the transaction pool

func (*TXPoolServer) GetPID

func (s *TXPoolServer) GetPID() *actor.PID

GetPID returns an actor pid with the actor type, If the type doesn't exist, return nil.

func (*TXPoolServer) GetPendingTx added in v1.14.1

func (s *TXPoolServer) GetPendingTx(hash common.Uint256) *serverPendingTx

func (*TXPoolServer) Nonce added in v1.14.1

func (s *TXPoolServer) Nonce(addr common.Address) uint64

func (*TXPoolServer) PendingEIPTransactions added in v1.14.1

func (s *TXPoolServer) PendingEIPTransactions() []*ethtype.Transaction

func (*TXPoolServer) PendingTransactionsByHash added in v1.14.1

func (s *TXPoolServer) PendingTransactionsByHash(target ethcomm.Hash) *ethtype.Transaction

func (*TXPoolServer) RegisterActor

func (s *TXPoolServer) RegisterActor(pid *actor.PID)

registers an actor with the actor type and pid.

func (*TXPoolServer) Stop

func (s *TXPoolServer) Stop()

Stop stops server and workers.

type TxPoolActor

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

TxnPoolActor: Handle the high priority request from Consensus

func NewTxPoolActor

func NewTxPoolActor(s *TXPoolServer) *TxPoolActor

NewTxPoolActor creates an actor to handle the messages from the consensus

func (*TxPoolActor) Receive

func (tpa *TxPoolActor) Receive(context actor.Context)

Receive implements the actor interface

type TxPoolService added in v1.14.1

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

TxnActor: Handle the low priority msg from P2P and API

func NewTxPoolService added in v1.14.1

func NewTxPoolService(s *TXPoolServer) *TxPoolService

creates an actor to handle the transaction-based messages from network and http

func (*TxPoolService) AppendTransaction added in v1.14.1

func (ta *TxPoolService) AppendTransaction(sender tc.SenderType, txn *tx.Transaction) *tc.TxResult

func (*TxPoolService) AppendTransactionAsync added in v1.14.1

func (ta *TxPoolService) AppendTransactionAsync(sender tc.SenderType, txn *tx.Transaction)

func (*TxPoolService) GetGasPrice added in v1.14.1

func (ta *TxPoolService) GetGasPrice() uint64

func (*TxPoolService) GetTransaction added in v1.14.1

func (ta *TxPoolService) GetTransaction(hash common.Uint256) *tx.Transaction

func (*TxPoolService) GetTransactionStatus added in v1.14.1

func (ta *TxPoolService) GetTransactionStatus(hash common.Uint256) *tc.TxStatus

func (*TxPoolService) GetTxAmount added in v1.14.1

func (ta *TxPoolService) GetTxAmount() []uint32

func (*TxPoolService) GetTxList added in v1.14.1

func (ta *TxPoolService) GetTxList() []common.Uint256

Jump to

Keyboard shortcuts

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