Stream additional block metadata via plugin (#22023)

* Stream additional block metadata through plugin
blockhash, block_height, block_time, rewards are streamed
This commit is contained in:
Lijun Wang
2021-12-29 15:12:01 -08:00
committed by GitHub
parent c9c78622a8
commit f14928a970
13 changed files with 383 additions and 12 deletions

View File

@ -153,6 +153,16 @@ CREATE TABLE transaction (
CONSTRAINT transaction_pk PRIMARY KEY (slot, signature)
);
-- The table storing block metadata
CREATE TABLE block (
slot BIGINT PRIMARY KEY,
blockhash VARCHAR(44),
rewards "Reward"[],
block_time BIGINT,
block_height BIGINT,
updated_on TIMESTAMP NOT NULL
);
/**
* The following is for keeping historical data for accounts and is not required for plugin to work.
*/

View File

@ -8,6 +8,7 @@ DROP TABLE account_audit;
DROP TABLE account;
DROP TABLE slot;
DROP TABLE transaction;
DROP TABLE block;
DROP TYPE "TransactionError" CASCADE;
DROP TYPE "TransactionErrorCode" CASCADE;