You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#1382. Reward withdrawals now carry the selected routing budget through the whole payout path instead of validating against one budget and paying with the default fee cap.
Changes:
Store routing_budget_ppm and routing_budget_sats on reward withdrawal LNPayment rows.
Use the stored reward payout routing budget in both LND and CLN reward pay_invoice() calls, with legacy fallback for old rows that have no stored budget.
Restore the original reward balance if a custom-budget reward payment fails, instead of restoring only the reduced invoice amount.
Extend the unilateral-cancel reward withdrawal test to use a non-zero routing budget and assert the stored payout amount/budget.
python3 manage.py test tests.test_trade_pipeline.TradeTest.test_withdraw_reward_after_unilateral_cancel_routing_budget --verbosity=2
That was blocked before test startup because the local Python environment did not have Django installed. I then created a Python 3.12 venv, but full requirements installation was blocked by psycopg2==2.9.10 needing pg_config, which is not available on this machine.
BTC payout address if this is accepted for the sats reward: bc1qev5ant33v5y89qqjvcf4mh9hlax5svqf5xd7gc
CI note: the Python linter passed on this head, but the coordinator test workflow failed before running any tests.
Failure is in Download static files Artifact:
no downloadable artifacts found (expired) for django-main-static from frontend-build.yml run 21478603168 dated 2026-01-29. That artifact expired on 2026-04-29.
So the LND/CLN coordinator tests did not reach Docker orchestration or Django test execution on this PR head. Local validation still passed py_compile, diff check, and targeted ruff; local focused Django test remains blocked by missing pg_config for psycopg2 installation on this machine.
Likely unblock: a maintainer needs to dispatch Build: Frontend All Bundles on an upstream RoboSats branch (or update the coordinator test workflow to build/use a fresh django-main-static artifact). Runs from forks are skipped by the current allow_forks: false artifact lookup, so I am not pushing an unrelated frontend-only change to this Python fix PR.
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
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.
Summary
Fixes #1382. Reward withdrawals now carry the selected routing budget through the whole payout path instead of validating against one budget and paying with the default fee cap.
Changes:
routing_budget_ppmandrouting_budget_satson reward withdrawalLNPaymentrows.pay_invoice()calls, with legacy fallback for old rows that have no stored budget.Validation
Passed locally:
python3 -m py_compile api/logics.py api/lightning/lnd.py api/lightning/cln.py tests/test_trade_pipeline.pygit diff --check/tmp/robosats-1382-venv/bin/python -m ruff check api/logics.py api/lightning/lnd.py api/lightning/cln.py tests/test_trade_pipeline.pyAttempted focused Django test:
python3 manage.py test tests.test_trade_pipeline.TradeTest.test_withdraw_reward_after_unilateral_cancel_routing_budget --verbosity=2That was blocked before test startup because the local Python environment did not have Django installed. I then created a Python 3.12 venv, but full requirements installation was blocked by
psycopg2==2.9.10needingpg_config, which is not available on this machine.BTC payout address if this is accepted for the sats reward:
bc1qev5ant33v5y89qqjvcf4mh9hlax5svqf5xd7gc