Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockListener ¶
type BlockListener interface {
ReconcileConfirmationsForTransaction(ctx context.Context, txHash string, existingConfirmations []*ffcapi.MinimalBlockInfo, targetConfirmationCount uint64) (*ffcapi.ConfirmationUpdateResult, *ethrpc.TxReceiptJSONRPC, error)
GetMonitoredHeadLength() int // provides a getter on the configuration for unstable head length - as this information is important to consumers (might be multiple from this block listener)
AddConsumer(ctx context.Context, c *BlockUpdateConsumer)
RemoveConsumer(ctx context.Context, id *fftypes.UUID)
GetHighestBlock(ctx context.Context) (uint64, bool)
GetBlockInfoByNumber(ctx context.Context, blockNumber uint64, allowCache bool, expectedParentHashStr string, expectedBlockHashStr string) (*ethrpc.BlockInfoJSONRPC, error)
GetBlockInfoByHash(ctx context.Context, hash0xString string) (*ethrpc.BlockInfoJSONRPC, error)
GetEVMBlockWithTxHashesByHash(ctx context.Context, hash0xString string) (b *ethrpc.EVMBlockWithTxHashesJSONRPC, err error)
GetEVMBlockWithTransactionsByHash(ctx context.Context, hash0xString string) (b *ethrpc.EVMBlockWithTransactionsJSONRPC, err error)
GetEVMBlockWithTxHashesByNumber(ctx context.Context, numberLookup string) (b *ethrpc.EVMBlockWithTxHashesJSONRPC, err error)
GetEVMBlockWithTransactionsByNumber(ctx context.Context, numberLookup string) (b *ethrpc.EVMBlockWithTransactionsJSONRPC, err error)
FetchBlockReceiptsAsync(blockNumber uint64, blockHash ethtypes.HexBytes0xPrefix, cb func([]*ethrpc.TxReceiptJSONRPC, error))
SnapshotMonitoredHeadChain() []*ethrpc.BlockInfoJSONRPC // snapshot the whole view, with complete blocks, using the read-lock.
WaitClosed()
GetBackend() rpcbackend.RPC
UTSetBackend(rpcbackend.RPC)
}
func NewBlockListener ¶
func NewBlockListenerSupplyBackend ¶
func NewBlockListenerSupplyBackend(ctx context.Context, retry *retry.Retry, conf *BlockListenerConfig, httpBackend rpcbackend.RPC, wsBackend rpcbackend.WebSocketRPCClient) (_ BlockListener, err error)
type BlockListenerConfig ¶
type BlockListenerConfig struct {
MonitoredHeadLength int `json:"monitoredHeadLength"`
BlockPollingInterval time.Duration `json:"blockPollingInterval"`
HederaCompatibilityMode bool `json:"hederaCompatibilityMode"`
BlockCacheSize int `json:"blockCacheSize"`
IncludeLogsBloom bool `json:"includeLogsBloom"`
UseGetBlockReceipts bool `json:"useGetBlockReceipts"`
MaxAsyncBlockFetchConcurrency int `json:"maxAsyncBlockFetchConcurrency"`
}
type BlockUpdateConsumer ¶
Click to show internal directories.
Click to hide internal directories.