Documentation ¶
Index ¶
- type DbOperator
- type NodeFetcher
- type ParsedBlockInfo
- type ParsedTransactionInfo
- type PgOperator
- func (p *PgOperator) GetBlockHash(height uint64) (*moneroutil.Hash, error)
- func (p *PgOperator) GetLastBlockHeight() (*uint64, error)
- func (p *PgOperator) GetShortChain() ([]utils.HeightInfo, error)
- func (p *PgOperator) SaveParsedBlocks(ctx context.Context, blocks []ParsedBlockInfo) error
- func (p *PgOperator) TrimBlockchain(ctx context.Context, height uint64) error
- type RealNodeFetcher
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbOperator ¶
type DbOperator interface { GetShortChain() ([]utils.HeightInfo, error) SaveParsedBlocks(ctx context.Context, blocks []ParsedBlockInfo) error GetLastBlockHeight() (*uint64, error) TrimBlockchain(ctx context.Context, height uint64) error GetBlockHash(height uint64) (*moneroutil.Hash, error) }
func NewDbOperator ¶
func NewDbOperator(settings utils.DbSettings) (DbOperator, error)
type NodeFetcher ¶
type NodeFetcher interface {
GetBlocks(shortChain []utils.HeightInfo, lastHeight uint64) (*moneroproto.GetBlocksFastResponse, error)
}
func NewNodeFetcher ¶
func NewNodeFetcher(nodeAddress string) (NodeFetcher, error)
type ParsedBlockInfo ¶
type ParsedBlockInfo struct { Height uint64 Hash moneroutil.Hash Header []byte Timestamp uint32 Transactions []ParsedTransactionInfo }
type ParsedTransactionInfo ¶
type ParsedTransactionInfo struct { Hash moneroutil.Hash Blob []byte OutputKeys []moneroutil.Key OutputIndices []uint64 UsedInInputs []uint64 Timestamp uint32 }
type PgOperator ¶
type PgOperator struct {
// contains filtered or unexported fields
}
func (*PgOperator) GetBlockHash ¶
func (p *PgOperator) GetBlockHash(height uint64) (*moneroutil.Hash, error)
func (*PgOperator) GetLastBlockHeight ¶
func (p *PgOperator) GetLastBlockHeight() (*uint64, error)
func (*PgOperator) GetShortChain ¶
func (p *PgOperator) GetShortChain() ([]utils.HeightInfo, error)
func (*PgOperator) SaveParsedBlocks ¶
func (p *PgOperator) SaveParsedBlocks(ctx context.Context, blocks []ParsedBlockInfo) error
func (*PgOperator) TrimBlockchain ¶
func (p *PgOperator) TrimBlockchain(ctx context.Context, height uint64) error
type RealNodeFetcher ¶
type RealNodeFetcher struct {
// contains filtered or unexported fields
}
func (*RealNodeFetcher) GetBlocks ¶
func (r *RealNodeFetcher) GetBlocks(shortChain []utils.HeightInfo, lastHeight uint64) (*moneroproto.GetBlocksFastResponse, error)
TODO: make cancellation
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(db DbOperator, node NodeFetcher, genesisInfo *genesis.GenesisBlockInfo) *Worker
Click to show internal directories.
Click to hide internal directories.