Ledger handler

This commit is contained in:
CJ Cobb
2021-03-04 14:34:55 -05:00
parent 694ec7bfe5
commit 6bbb5579ca
9 changed files with 135 additions and 7 deletions

View File

@@ -761,6 +761,9 @@ CREATE TABLE IF NOT EXISTS transactions (
transaction bytea NOT NULL,
metadata bytea NOT NULL
);
-- Index for lookups by ledger hash.
CREATE INDEX IF NOT EXISTS ledgers_ledger_seq_idx ON transactions
USING hash (ledger_seq);
-- Table that maps accounts to transactions affecting them. Deletes from the
-- ledger table cascade here based on ledger_seq.