diff --git a/analyzer/consensus/data_fetch.go b/analyzer/consensus/data_fetch.go index 95096b850..5a5c5fe62 100644 --- a/analyzer/consensus/data_fetch.go +++ b/analyzer/consensus/data_fetch.go @@ -283,6 +283,8 @@ func fetchRootHashData(ctx context.Context, cc nodeapi.ConsensusApiLite, height return nil, err } + lrr, err := cc.RoothashGetLastRoundResults(ctx, height) + return &rootHashData{ Height: height, Events: events, diff --git a/analyzer/queries/queries.go b/analyzer/queries/queries.go index 2b93f93a2..9469bfa1c 100644 --- a/analyzer/queries/queries.go +++ b/analyzer/queries/queries.go @@ -219,6 +219,17 @@ var ( schedule_height = excluded.schedule_height, message = excluded.message` + ConsensusRoothashMessageFinalizeUpsert = ` + INSERT INTO chain.roothash_messages + (runtime, round, message_index, finalize_height, error_module, error_code, result) + VALUES + ($1, $2, $3, $4, $5, $6, $7) + ON CONFLICT (runtime, round, message_index) DO UPDATE + SET + error_module = excluded.error_module, + error_code = excluded.error_code, + result = excluded.result` + ConsensusAccountRelatedTransactionInsert = ` INSERT INTO chain.accounts_related_transactions (account_address, tx_block, tx_index) VALUES ($1, $2, $3)`