Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProtocolID is the ID of protocol ProtocolID = "accounts" // AccountHistoryTableName is the table name of account history AccountHistoryTableName = "account_history" // AccountBalanceViewName is the view name of account balance AccountBalanceViewName = "account_balance" // EpochAddressIndexName is the index name of epoch number and address on account history table EpochAddressIndexName = "epoch_address_index" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalance ¶
AccountBalance defines the base schema of "account balance" view
type AccountHistory ¶
type AccountHistory struct { EpochNumber uint64 BlockHeight uint64 ActionHash string Address string In string Out string }
AccountHistory defines the base schema of "account history" table
type Protocol ¶
Protocol defines the protocol of indexing blocks
func NewProtocol ¶
NewProtocol creates a new protocol
func (*Protocol) CreateTables ¶
CreateTables creates tables
func (*Protocol) HandleBlock ¶
HandleBlock handles blocks
func (*Protocol) Initialize ¶
func (p *Protocol) Initialize(ctx context.Context, tx *sql.Tx, genesis *indexprotocol.Genesis) error
Initialize initializes actions protocol
Click to show internal directories.
Click to hide internal directories.