Documentation ¶
Index ¶
- type AbstractMsgBlock
- func FetchNextBlockFromBtcNode(offset int64, checkPrevBlock bool, rpcClient *AbstractRPCClient, ...) (block *AbstractMsgBlock, prevBlockNum, blockHeight int64, ...)
- func FetchNextBlockFromJaxNode(offset int64, checkPrevBlock bool, rpcClient *AbstractRPCClient, ...) (block *AbstractMsgBlock, prevBlockNum, blockHeight int64, ...)
- func InitBlock(block interface{}) (abstractMsgBlock *AbstractMsgBlock)
- type AbstractRPCClient
- type IndexImplementation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractMsgBlock ¶
type AbstractMsgBlock struct {
// contains filtered or unexported fields
}
func FetchNextBlockFromBtcNode ¶
func FetchNextBlockFromBtcNode(offset int64, checkPrevBlock bool, rpcClient *AbstractRPCClient, cacheHandler *blocks_cache.CacheHandler) ( block *AbstractMsgBlock, prevBlockNum, blockHeight int64, rebuildingChainBlockNumber int64, err error)
func FetchNextBlockFromJaxNode ¶
func FetchNextBlockFromJaxNode(offset int64, checkPrevBlock bool, rpcClient *AbstractRPCClient, cacheHandler *blocks_cache.CacheHandler) ( block *AbstractMsgBlock, prevBlockNum, blockHeight int64, rebuildingChainBlockNumber int64, err error)
func InitBlock ¶
func InitBlock(block interface{}) (abstractMsgBlock *AbstractMsgBlock)
func (AbstractMsgBlock) BTCMsgBlock ¶
func (amb AbstractMsgBlock) BTCMsgBlock() (block *btcwire.MsgBlock, err error)
func (AbstractMsgBlock) BlockHash ¶
func (amb AbstractMsgBlock) BlockHash() string
func (AbstractMsgBlock) JaxMsgBlock ¶
func (amb AbstractMsgBlock) JaxMsgBlock() (block *jaxwire.MsgBlock, err error)
func (AbstractMsgBlock) TxCnt ¶
func (amb AbstractMsgBlock) TxCnt() int
type AbstractRPCClient ¶
type AbstractRPCClient struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(client interface{}) (abstractRPCClient *AbstractRPCClient)
func InitBTCRPCClient ¶
func InitBTCRPCClient() (*AbstractRPCClient, error)
func InitJaxRPCClient ¶
func InitJaxRPCClient() (*AbstractRPCClient, error)
func (AbstractRPCClient) BTCRPCClient ¶
func (arc AbstractRPCClient) BTCRPCClient() (client *btcclient.Client, err error)
func (AbstractRPCClient) JaxRPCClient ¶
func (arc AbstractRPCClient) JaxRPCClient() (client *jaxclient.Client, err error)
type IndexImplementation ¶
type IndexImplementation interface { InitRPCClient() (*AbstractRPCClient, error) FetchNextBlockFromNode(offset int64, checkPrevBlock bool, rpcClient *AbstractRPCClient, cacheHandler *blocks_cache.CacheHandler) ( *AbstractMsgBlock, int64, int64, int64, error) // ConnectBlock is called each time new block arrives to the indexer. ConnectBlock(tx pgx.Tx, block *AbstractMsgBlock, blockHeight int64, rpcClient *AbstractRPCClient) error // DisconnectBlock is called each time some block is disconnected from the main chain, // and must be reverted from the index also. DisconnectBlock(tx pgx.Tx, block *AbstractMsgBlock, blockHeight int64, rpcClient *AbstractRPCClient) error // SetHttpHandlers allows custom index to specify API handlers for it's own. SetHttpHandlers(group *router.Group) // DefaultFirstBlockForProcessing returns the serial ID of the first block from which indexing should be started. DefaultFirstBlockForProcessing() int64 // PrepareDatabase makes some preliminary actions with the database before blocks processing begins, // e.g. initialises current block height table for UTXOs indexer in case of the first start. // (For the details, please see the docs for this method from the UTXOs index implementation) PrepareDatabase() error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.