Skip to content

fix: remove redundant donor record fetch in claim_refund (#79)#84

Merged
Alqku merged 1 commit into
OrbitChainLabs:mainfrom
7udah:fix/issue-79-remove-redundant-donor-fetch-in-claim-refund
Jun 28, 2026
Merged

fix: remove redundant donor record fetch in claim_refund (#79)#84
Alqku merged 1 commit into
OrbitChainLabs:mainfrom
7udah:fix/issue-79-remove-redundant-donor-fetch-in-claim-refund

Conversation

@7udah

@7udah 7udah commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

claim_refund was reading the donor record from persistent storage twice in immediate succession. The first read was bound to _donor_record and immediately discarded, doubling the host-storage I/O (including a bump_persistent TTL extension call inside get_donor) on an already-expensive refund path.

Changes

  • Removed the unused _donor_record binding from claim_refund in campaign/src/lib.rs

Testing

Existing campaign contract tests pass without modification — the change is pure dead code removal with no behavioural impact.

Closes #79

@Alqku Alqku left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Alqku Alqku merged commit 94b59c2 into OrbitChainLabs:main Jun 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LOW] claim_refund fetches donor record twice; first read is discarded

2 participants