Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProcessor ¶
func NewProcessor(client blockchain.EthClient, stateService state.Service, scanner scan.Scanner, laosHTTP LaosRPCRequests, c *config.Config, ) *processor
Types ¶
type Block ¶
type Block struct {
Header BlockHeader `json:"header"`
}
Block struct to represent the block in the JSON response
type BlockHeader ¶
type BlockHeader struct { ParentHash string `json:"parentHash"` Number string `json:"number"` StateRoot string `json:"stateRoot"` ExtrinsicsRoot string `json:"extrinsicsRoot"` }
BlockHeader struct to represent the block header in the JSON response
type ChainGetBlock ¶
type ChainGetBlock struct { JSONRPC string `json:"jsonrpc"` Result struct { Block Block `json:"block"` } `json:"result"` ID int `json:"id"` }
Response struct to represent the entire JSON response
type ChainGetFinalizedHead ¶
type ChainGetFinalizedHead struct { JSONRPC string `json:"jsonrpc"` Result string `json:"result"` ID int `json:"id"` }
Response struct to represent the entire JSON response
type HTTPClient ¶
Define an interface for HTTP client operations
type LaosHTTP ¶
type LaosHTTP struct {
// contains filtered or unexported fields
}
func (LaosHTTP) LatestFinalizedBlockHash ¶
type LaosRPCRequests ¶
type LaosRPCRequests interface { LatestFinalizedBlockHash() (string, error) BlockNumber(blockHash string) (*big.Int, error) }
Define an interface for HTTP client operations
func NewLaosHTTP ¶
func NewLaosHTTP(client HTTPClient, url string) LaosRPCRequests
type Processor ¶
type Processor interface { GetInitStartingBlock(ctx context.Context) (uint64, error) GetLastBlock(ctx context.Context, startingBlock uint64) (uint64, error) VerifyChainConsistency(ctx context.Context, startingBlock uint64) error ProcessEvoBlockRange(ctx context.Context, startingBlock, lastBlock uint64) error }
Click to show internal directories.
Click to hide internal directories.