fix: credit withdrawal fees to founder community#2108
Merged
Scottcjn merged 1 commit intoScottcjn:mainfrom Apr 6, 2026
Merged
Conversation
Contributor
Author
|
For bounty payout, please use RTC wallet: |
Owner
|
Merged. Payment: 50 RTC. Addresses #2107. Withdrawal fees were silently burned due to column name mismatch ( |
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.
Fix: Route withdrawal fees to correct columns (balance_rtc / miner_pk)
Problem
RIP-301 withdrawal fee routing used non-existent columns
amount_i64andminer_idon thebalancestable. The actual schema hasminer_pkandbalance_rtc. TheUPDATEsilently affected 0 rows, burning fees instead of creditingfounder_community.Changes
node/rustchain_v2_integrated_v2.2.1_rip200.pyThree locations fixed:
request_withdrawal()(line ~4033): Fee creditUPDATEnow usesbalance_rtc/miner_pk. AddedINSERT OR IGNOREto ensure thefounder_communityrow exists before crediting./api/fee_pool(line ~4109): Community fund balance read now usesbalance_rtc/miner_pk. Removed incorrect/ 1_000_000division (the old code treatedamount_i64as micro-units;balance_rtcis already in RTC)./api/bounty-multiplier(line ~4754): Community fund balance read now usesbalance_rtc/miner_pk. Removed incorrect micro-unit conversion.tests/test_requirements_extra.pyAdded
test_withdrawal_fee_routed_to_founder_community— a focused regression test that:balancestable with the actual schema (miner_pk,balance_rtc)founder_community(not burned)fee_eventsaudit record is consistentVerification
Scope
Minimal, targeted fix. No refactoring. Only the 3 broken SQL statements and 1 new test.