Claiming Code Review Bounty #73 for a formal GitHub PR review submitted on Scottcjn/Rustchain PR #6659.
Review URL:
Scottcjn/Rustchain#6659 (review)
Reviewed head:
6fe87e57fb635ecf23ad501b5b6a79ac3589e19a
Review outcome:
CHANGES_REQUESTED
Scope reviewed:
rustchain_export.py
tests/test_rustchain_export.py
docs/rustchain-export.md
Finding summary:
- SQLite balance export reads micro-unit columns such as
amount_i64 and balance_urtc.
normalize_rtc() only divides by MICRO_RTC when the numeric value is at least 1,000,000.
- Reproduced that
amount_i64 = 500000 exports as 500000.0 RTC instead of 0.5 RTC, and 999999 exports as 999999.0 RTC instead of 0.999999 RTC.
- The existing test covers
1_250_000 -> 1.25 but misses sub-1-RTC balances.
- Recommended normalizing based on the source column/unit rather than numeric magnitude.
Validation run:
python3 -m py_compile rustchain_export.py tests/test_rustchain_export.py -> passed
python3 -m unittest tests.test_rustchain_export -v -> 3 tests passed
- local reproduction confirms sub-1-RTC micro balances are misreported
Disclosure: I received RTC compensation for this review.
Payout target / miner_id:
keon0711
Claiming Code Review Bounty #73 for a formal GitHub PR review submitted on Scottcjn/Rustchain PR #6659.
Review URL:
Scottcjn/Rustchain#6659 (review)
Reviewed head:
6fe87e57fb635ecf23ad501b5b6a79ac3589e19aReview outcome:
CHANGES_REQUESTED
Scope reviewed:
rustchain_export.pytests/test_rustchain_export.pydocs/rustchain-export.mdFinding summary:
amount_i64andbalance_urtc.normalize_rtc()only divides byMICRO_RTCwhen the numeric value is at least 1,000,000.amount_i64 = 500000exports as500000.0 RTCinstead of0.5 RTC, and999999exports as999999.0 RTCinstead of0.999999 RTC.1_250_000 -> 1.25but misses sub-1-RTC balances.Validation run:
python3 -m py_compile rustchain_export.py tests/test_rustchain_export.py-> passedpython3 -m unittest tests.test_rustchain_export -v-> 3 tests passedDisclosure: I received RTC compensation for this review.
Payout target / miner_id:
keon0711