Skip to content

Show settle time for graduated receives#81

Open
benthecarman wants to merge 1 commit into
masterfrom
more-time-fixes
Open

Show settle time for graduated receives#81
benthecarman wants to merge 1 commit into
masterfrom
more-time-fixes

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

The transaction list rendered receives that graduated into Lightning using the rebalancer's detection-time stamp (SystemTime::now()), recorded when it first observed the payment. Receives discovered in a single sync pass therefore all displayed an identical time, and a receive that settled while offline floated to the top of history.

Fix this at the source: when the rebalancer first observes a receive, stamp the authoritative time into its metadata instead of now(), the backend's settle time for trusted receives and ldk-node's update (confirmation) time for on-chain ones. That time is preserved through rebalance promotion, so the graduated-transfer display reads it directly and the per-branch read-side overrides are no longer needed. This also corrects a non-graduated on-chain receive that the rebalancer observed but did not graduate, which previously surfaced detection time.

Outbound sends keep their initiation time, as they are observed live.

Add regression tests for both graduated paths, each forcing a gap between the real settle time and the rebalancer's discovery stamp.

The transaction list rendered receives that graduated into Lightning
using the rebalancer's detection-time stamp (SystemTime::now()),
recorded when it first observed the payment. Receives discovered in a
single sync pass therefore all displayed an identical time, and a
receive that settled while offline floated to the top of history.

Fix this at the source: when the rebalancer first observes a receive,
stamp the authoritative time into its metadata instead of now() -- the
backend's settle time for trusted receives and ldk-node's update
(confirmation) time for on-chain ones. That time is preserved through
rebalance promotion, so the graduated-transfer display reads it
directly and the per-branch read-side overrides are no longer needed.
This also corrects a non-graduated on-chain receive that the rebalancer
observed but did not graduate, which previously surfaced detection time.

Outbound sends keep their initiation time, as they are observed live.

Add regression tests for both graduated paths, each forcing a gap
between the real settle time and the rebalancer's discovery stamp.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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