Show settle time for graduated receives#81
Open
benthecarman wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.