Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInconsistentReceipt is returned if the transacion cannot map to a receipt ErrInconsistentReceipt = errors.New("inconsistent receipt") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // Init the store manager to load the erc20 list Init(ctx context.Context) error // FindERC20 finds the erc20 code FindERC20(ctx context.Context, address gethCommon.Address) (*model.ERC20, error) // InsertERC20 inserts the erc20 code InsertERC20(ctx context.Context, code *model.ERC20) error // InsertTd writes the total difficulty for a block InsertTd(ctx context.Context, data *model.TotalDifficulty) error // FindLatestBlock returns a latest header from db FindLatestBlock(ctx context.Context) (*model.Header, error) // FindBlockByNumber returns the header of the given block number FindBlockByNumber(ctx context.Context, number int64) (*model.Header, error) // FindTd returns the TD of the given block hash FindTd(ctx context.Context, hash []byte) (*model.TotalDifficulty, error) // UpdateBlocks updates all block data UpdateBlocks(ctx context.Context, balancer client.Balancer, blocks []*types.Block, receipts [][]*types.Receipt, events [][]*types.TransferLog, reorgEvent *model.Reorg) error }
Manager is a wrapper interface to insert block, receipt and states quickly
func NewManager ¶
func NewManager(db *sqlx.DB, chainConfig *params.ChainConfig) Manager
NewManager news a store manager to insert block, receipts and states.
Directories ¶
Path | Synopsis |
---|---|
mocks
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
mocks
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
mocks
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
mocks
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
mocks
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
mocks
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
Click to show internal directories.
Click to hide internal directories.