Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrExecutedTxNotFoundInOrderedTxs = errors.New("executed tx not found in ordered txs")
ErrExecutedTxNotFoundInOrderedTxs signals that a transaction that was executed was not found in the ordered transactions
var ErrIndexOutOfBounds = errors.New("index out of bounds")
ErrIndexOutOfBounds signals that an index is out of bounds
var ErrMiniBlocksHeadersMismatch = errors.New("mini blocks headers mismatch")
ErrMiniBlocksHeadersMismatch signals that the number of miniBlock headers is different than the number of miniBlocks
var ErrNilBodyHandler = errors.New("nil body handler")
ErrNilBodyHandler signal that provided body handler is nil
var ErrNilEnableEpochsHandler = errors.New("nil enable epochs handler")
ErrNilEnableEpochsHandler signals that a nil enable epochs handler has been provided
var ErrNilExecutedTxHashes = errors.New("nil executed tx hashes map")
ErrNilExecutedTxHashes signals that a nil executed tx hashes map has been provided
var ErrNilExecutionOrderGetter = errors.New("nil execution order getter")
ErrNilExecutionOrderGetter signals that a nil execution order getter has been provided
var ErrNilGasConsumedProvider = errors.New("nil gas consumed provider")
ErrNilGasConsumedProvider signals that a nil gas consumed provider has been provided
var ErrNilHasher = errors.New("nil hasher provided")
ErrNilHasher signals that a nil hasher has been provided
var ErrNilHeaderHandler = errors.New("nil header handler")
ErrNilHeaderHandler signal that provided header handler is nil
var ErrNilMiniBlock = errors.New("nil miniBlock")
ErrNilMiniBlock signals that a nil miniBlock has been provided
var ErrNilMiniBlockHeaderHandler = errors.New("nil miniBlock header handler")
ErrNilMiniBlockHeaderHandler signals that a nil miniBlock header handler has been provided
var ErrNilNodesCoordinator = errors.New("validator group selector is nil")
ErrNilNodesCoordinator is raised when a valid validator group selector is expected but nil used
var ErrNilOrderedTxHashes = errors.New("nil ordered tx list")
ErrNilOrderedTxHashes signals that a nil ordered tx list has been provided
var ErrNilStorer = errors.New("nil storer")
ErrNilStorer is raised when a nil storer has been provided
var ErrNilTransactionCoordinator = errors.New("transaction coordinator is nil")
ErrNilTransactionCoordinator signals that transaction coordinator is nil
var ErrOrderedTxNotFound = errors.New("ordered tx not found in pool")
ErrOrderedTxNotFound signals that an ordered tx hash was not found in the pool
var ErrWrongTypeAssertion = errors.New("wrong type assertion")
ErrWrongTypeAssertion signals that a wrong type assertion has been done
Functions ¶
func NewOutportDataProvider ¶
func NewOutportDataProvider(arg ArgOutportDataProvider) (*outportDataProvider, error)
NewOutportDataProvider will create a new instance of outportDataProvider
Types ¶
type AlteredAccountsProviderHandler ¶
type AlteredAccountsProviderHandler interface { ExtractAlteredAccountsFromPool(txPool *outport.TransactionPool, options shared.AlteredAccountsOptions) (map[string]*alteredAccount.AlteredAccount, error) IsInterfaceNil() bool }
AlteredAccountsProviderHandler defines the functionality needed for provisioning of altered accounts when indexing data
type ArgOutportDataProvider ¶
type ArgOutportDataProvider struct { IsImportDBMode bool ShardCoordinator sharding.Coordinator AlteredAccountsProvider AlteredAccountsProviderHandler TransactionsFeeProcessor TransactionsFeeHandler TxCoordinator process.TransactionCoordinator NodesCoordinator nodesCoordinator.NodesCoordinator GasConsumedProvider GasConsumedProvider EconomicsData EconomicsDataHandler Marshaller marshal.Marshalizer Hasher hashing.Hasher ExecutionOrderHandler common.ExecutionOrderGetter }
ArgOutportDataProvider holds the arguments needed for creating a new instance of outportDataProvider
type ArgPrepareOutportSaveBlockData ¶
type ArgPrepareOutportSaveBlockData struct { HeaderHash []byte Header data.HeaderHandler HeaderBytes []byte HeaderType string Body data.BodyHandler PreviousHeader data.HeaderHandler RewardsTxs map[string]data.TransactionHandler NotarizedHeadersHashes []string HighestFinalBlockNonce uint64 HighestFinalBlockHash []byte }
ArgPrepareOutportSaveBlockData holds the arguments needed for prepare outport save block data
type EconomicsDataHandler ¶
type EconomicsDataHandler interface { ComputeGasUsedAndFeeBasedOnRefundValue(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int) ComputeTxFeeBasedOnGasUsed(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int ComputeTxFee(tx data.TransactionWithFeeHandler) *big.Int ComputeGasLimit(tx data.TransactionWithFeeHandler) uint64 IsInterfaceNil() bool MaxGasLimitPerBlock(shardID uint32) uint64 }
EconomicsDataHandler defines the functionality needed for economics data
type GasConsumedProvider ¶
type GasConsumedProvider interface { TotalGasProvided() uint64 TotalGasProvidedWithScheduled() uint64 TotalGasRefunded() uint64 TotalGasPenalized() uint64 IsInterfaceNil() bool }
GasConsumedProvider defines the functionality needed for providing gas consumed information
type TransactionsFeeHandler ¶
type TransactionsFeeHandler interface { PutFeeAndGasUsed(pool *outport.TransactionPool, epoch uint32) error IsInterfaceNil() bool }
TransactionsFeeHandler defines the functionality needed for computation of the transaction fee and gas used