Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockchain ¶
type IndexBlocks ¶
type IndexBlocks struct {
// contains filtered or unexported fields
}
func NewIndexBlocksUseCase ¶
func NewIndexBlocksUseCase( logger common.Logger, settings settings.Settings, indexReputation *IndexReputation, database Database, blockchain Blockchain) *IndexBlocks
func (*IndexBlocks) Execute ¶
func (u *IndexBlocks) Execute(ctx context.Context) error
Execute checks the last block indexed (minus an offset) and the latest block produced and indexes all blocks in between. Executre returns an error if it failed to fully index the blocks. We want to make indexing idempotent and be resilient to re-orgs so we:
- keep track of last block indexed
- read events from last block indexed - n to lastest block
- always delete events that already exist for the same block being inserted (in single tx)
type IndexReputation ¶
type IndexReputation struct {
// contains filtered or unexported fields
}
func NewIndexReputationUseCase ¶
func NewIndexReputationUseCase(logger common.Logger, settings settings.Settings, blockchainGateway Blockchain) *IndexReputation
Click to show internal directories.
Click to hide internal directories.