Buffer getter methods return internal references instead of copies
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in internal/indexer/indexer_buffer.go and compare GetTrustlineChanges(), GetContractChanges(), GetAccountChanges(), GetSACBalanceChanges(), and GetStateChanges() with GetTransactionsParticipants(), which uses maps.Clone(). Done means all five listed getters return copies rather than direct references to internal data structures.
Written by the indexing model from the issue text.
Description
What version are you using?
latest
Problem
File: internal/indexer/indexer_buffer.go (multiple methods)
Description: GetTrustlineChanges(), GetContractChanges(), GetAccountChanges(), GetSACBalanceChanges(), and GetStateChanges() return direct references to internal data structures. Compare with GetTransactionsParticipants() which correctly uses maps.Clone(). While currently safe because data is consumed synchronously before Clear(), this violates the buffer's thread-safety contract and is fragile.
- Dominant language
- Go
- Stars
- 30
- Forks
- 23
- Avg merge
- 6d 2h
- Merged PRs (30d)
- 20
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stellar/wallet-backend
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
stellar/wallet-backend#593 ·
-
Contract-creation state changes are emitted from auth entries whether or not the deployment executed Openbug
Difficulty 4/5 3-5 days Newbie friendliness 56/100
stellar/wallet-backend#746 ·
-
stellar/wallet-backend#744 · 1 assignee ·
-
stellar/wallet-backend#702 · 1 assignee ·
-
stellar/wallet-backend#701 · 1 assignee ·
All issues in stellar/wallet-backend
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100