minor fixes

This commit is contained in:
i-norden 2023-02-10 10:38:31 -06:00
parent 9f060ff0bf
commit 92a9f5856b
3 changed files with 12 additions and 1 deletions

View File

@ -6,6 +6,7 @@ CREATE TABLE IF NOT EXISTS eth.uncle_cids (
parent_hash VARCHAR(66) NOT NULL,
cid TEXT NOT NULL,
reward NUMERIC NOT NULL,
index INT NOT NULL,
PRIMARY KEY (block_hash, block_number)
);

View File

@ -5,9 +5,17 @@
-- instead, what we are doing for the time being is embedding the RLP here
CREATE TABLE IF NOT EXISTS eth.pending_txs (
tx_hash VARCHAR(66) NOT NULL PRIMARY KEY,
block_hash VARCHAR(66) NOT NULL, -- references block_hash in pending_blocks for the pending block this tx belongs to
timestamp BIGINT NOT NULL,
raw BYTEA NOT NULL
);
CREATE TABLE IF NOT EXISTS eth.pending_blocks (
block_hash VARCHAR(66) NOT NULL PRIMARY KEY,
block_number BIGINT NOT NULL,
raw_header BYTEA NOT NULL
)
-- +goose Down
DROP TABLE eth.pending_blocks;
DROP TABLE eth.pending_txs;

View File

@ -338,6 +338,7 @@ CREATE TABLE eth.log_cids (
CREATE TABLE eth.pending_txs (
tx_hash character varying(66) NOT NULL,
block_hash character varying(66) NOT NULL,
"timestamp" bigint NOT NULL,
raw bytea NOT NULL
);
@ -429,7 +430,8 @@ CREATE TABLE eth.uncle_cids (
header_id character varying(66) NOT NULL,
parent_hash character varying(66) NOT NULL,
cid text NOT NULL,
reward numeric NOT NULL
reward numeric NOT NULL,
index integer NOT NULL
);