Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block endpoints #1

Merged
merged 18 commits into from
Jan 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions persist/sqlite/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ CREATE TABLE global_settings (
);

CREATE TABLE blocks (
id BINARY(32) NOT NULL PRIMARY KEY,
id BLOB NOT NULL PRIMARY KEY,
height INTEGER NOT NULL,
parent_id BINARY(32) NOT NULL,
nonce BINARY(8) NOT NULL,
parent_id BLOB NOT NULL,
nonce BLOB NOT NULL,
timestamp INTEGER NOT NULL
);

CREATE TABLE miner_payouts (
block_id REFERENCES blocks(id) ON DELETE CASCADE,
block_id BLOB REFERENCES blocks(id) ON DELETE CASCADE NOT NULL PRIMARY KEY,
chris124567 marked this conversation as resolved.
Show resolved Hide resolved
block_order INTEGER NOT NULL,
address BINARY(32) NOT NULL,
value BINARY(16) NOT NULL
address BLOB NOT NULL,
value BLOB NOT NULL,
UNIQUE(block_id, block_order)
);
chris124567 marked this conversation as resolved.
Show resolved Hide resolved


Expand Down