Follow-up to #153 (round-2 review).
/api/history currently returns counterparty: null for every row because the account_history schema does not store the recipient address per-mutation — the table is keyed on the address that changed, not the address it transacted with.
Scope:
- migration: add
counterparty_address BYTEA NULL to account_history
- backfill: leave NULL for pre-existing rows (no signal); future writes set it where known
- trigger (migration 0008): plumb the counterparty through, similar to the existing
triggering_commit_txid GUC pattern
- writers: send / receive paths set the GUC (mint has no counterparty)
- handler:
router::history_row_to_item returns the populated value instead of None
TODO comment in node/src/router.rs::history_row_to_item references this issue.
Follow-up to #153 (round-2 review).
/api/historycurrently returnscounterparty: nullfor every row because theaccount_historyschema does not store the recipient address per-mutation — the table is keyed on the address that changed, not the address it transacted with.Scope:
counterparty_address BYTEA NULLtoaccount_historytriggering_commit_txidGUC patternrouter::history_row_to_itemreturns the populated value instead ofNoneTODO comment in
node/src/router.rs::history_row_to_itemreferences this issue.