Skip to content

rpc: add block timestamp and pagination to getaddressdeltas#453

Open
JSanchezFDZ wants to merge 1 commit into
Raptor3um:developfrom
JSanchezFDZ:fix/getaddressdeltas-timestamp-pagination
Open

rpc: add block timestamp and pagination to getaddressdeltas#453
JSanchezFDZ wants to merge 1 commit into
Raptor3um:developfrom
JSanchezFDZ:fix/getaddressdeltas-timestamp-pagination

Conversation

@JSanchezFDZ

Copy link
Copy Markdown

Two related improvements to getaddressdeltas, both backed by the address
index and fully backward compatible.

Block timestamp (closes #434)

Each delta now includes a timestamp field with the block time, resolved
from the active chain index under cs_main. Previously callers had to run
a second RPC per height (or keep their own height-to-time map) to learn
when a delta occurred.

Pagination (closes #433)

The request object accepts two new optional fields:

  • skip — number of leading deltas to drop (offset), default 0
  • count — maximum number of deltas to return, default 0 (unlimited)

Pagination is applied over the asset-filtered, height-ordered set, so
callers can request just a slice instead of always pulling the entire
history and trimming it client-side. Defaults preserve the previous
behaviour, so existing integrations are unaffected.

Closes #434.
Closes #433.

…m#434, Raptor3um#433)

getaddressdeltas previously returned every historical delta with no block
time, forcing callers to either run a second RPC per height or keep their
own height-to-time map, and to trim large result sets client-side.

- Add a "timestamp" field to each delta, resolved from the active chain
  index under cs_main (closes Raptor3um#434).
- Add optional "skip"/"count" fields to the request object so callers can
  page through the height-ordered deltas instead of always pulling the
  full history (closes Raptor3um#433). Both default to the previous behaviour
  (skip=0, count=0 meaning unlimited) so existing callers are unaffected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant