looprpc: populate static address swap timing and cost fields#1150
looprpc: populate static address swap timing and cost fields#1150hieblmi wants to merge 1 commit into
Conversation
hieblmi
commented
May 29, 2026
- Added initiation_time, last_update_time, cost_server, cost_onchain, and cost_offchain to StaticAddressLoopInSwap.
- Populated static loop-in list responses with stored initiation/update timestamps.
- Reported the persisted quoted swap fee as cost_server once the static loop-in invoice has been paid.
- Left on-chain/off-chain costs at zero because static timeout-path miner fees are not currently persisted.
- Added focused test coverage for static loop-in cost reporting behavior.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the static address loop-in functionality by exposing timing and cost information through the RPC interface. By updating the protobuf definitions and implementing logic to calculate and report these metrics, users can now gain better visibility into the lifecycle and financial performance of their static address swaps. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds initiation time, last update time, and cost fields (server, on-chain, off-chain) to the StaticAddressLoopInSwap protobuf message and populates them in the server implementation. It also introduces a helper function to calculate these costs and adds corresponding unit tests. The review feedback correctly identifies a potential issue where calling UnixNano() on uninitialized time.Time fields can lead to unexpected negative timestamps, and suggests adding safety checks for zero-time values and nil pointers.
9848cff to
7aae14b
Compare
7aae14b to
1e5911c
Compare