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

Extend balances table for better Rosetta #9859

Merged
merged 6 commits into from
Nov 23, 2021
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
Prev Previous commit
fix SQL for inserting balances
  • Loading branch information
psteckler committed Nov 21, 2021
commit ed643bfb0d9426a9055cb562dc986b59ddf293ce
6 changes: 4 additions & 2 deletions src/app/archive/archive_lib/processor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,10 @@ module Balance = struct
(Caqti_request.find
Caqti_type.(tup2 (tup2 int int64) (tup4 int int64 int int))
Caqti_type.int
{sql| INSERT INTO balances (public_key_id, balance) VALUES (?, ?) RETURNING id |sql})
{sql| INSERT INTO balances (public_key_id, balance,
block_id, block_height, block_sequence_no, block_secondary_sequence_no)
VALUES (?, ?, ?, ?, ?, ?)
RETURNING id |sql})
((public_key_id, balance_to_int64 balance),
(block_id, block_height, block_sequence_no, block_secondary_sequence_no))

Expand Down Expand Up @@ -1382,7 +1385,6 @@ module Block = struct
~block_id ~block_height:height
~block_sequence_no:sequence_no
~block_secondary_sequence_no:0

in
let receiver_account_creation_fee_paid =
account_creation_fee_of_fees_and_balance ?additional_fee
Expand Down