Skip to content

Commit 571c9e9

Browse files
committed
Add recent blocks table
The table will be used in the future to facilitate reorg handling.
1 parent 29e878a commit 571c9e9

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

rolling-shutter/chainobserver/db/keyper/models.sqlc.gen.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rolling-shutter/chainobserver/db/keyper/sql/schemas/keyper.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ CREATE TABLE keyper_set(
55
threshold integer NOT NULL,
66
PRIMARY KEY (keyper_config_index)
77
);
8+
9+
CREATE TABLE recent_block (
10+
block_hash bytea NOT NULL,
11+
block_number bigint NOT NULL,
12+
parent_hash bytea NOT NULL,
13+
timestamp bigint NOT NULL,
14+
header bytea NOT NULL,
15+
PRIMARY KEY (block_number)
16+
);

0 commit comments

Comments
 (0)