Skip to content

Capture counterparty_address per account_history row (schema change) #160

Description

@TaprootFreak

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions