Fix #247: Use borrowed &str keys for existing_tx_map in process_wallet_transactions#261
Fix #247: Use borrowed &str keys for existing_tx_map in process_wallet_transactions#261schjonhaug merged 1 commit intomasterfrom
Conversation
🤖 Codex Code ReviewNo PR-specific defects found in the changed lines. Findings
Test coverage
|
🤖 Gemini Code ReviewHere is a review of the proposed changes to Code Quality and Best Practices
Performance Considerations
Potential Bugs or Issues
Security Concerns
Test Coverage
|
🤖 Claude Code ReviewPull Request ReviewTwo PRs were merged in the recent commits: #247 (backend fix) and #253 (frontend layout refactor). PR #247 — Fix: Use borrowed
|
Hatchery PR handoffIssue: #247 Use borrowed &str keys for existing_tx_map in process_wallet_transactions SummaryUpdate Review contextNo review context available yet. Changed files
Validation
Lead-agent runs
|
Closes #247
Hatchery Report Back for Issue #247
Title: Use borrowed &str keys for existing_tx_map in process_wallet_transactions
Summary
Update
backend/src/sync.rssoprocess_wallet_transactionsuses a borrowedHashMap<&str, &TransactionWithWallet>forexisting_tx_map, matching the two other sync paths in the same file. This removes oneStringclone per existing transaction during wallet sync and standardizes lookup behavior across wallet/address-watch flows.Changed Files
Worker Results
Lead Agent Results
cargo test --libfailed, but on an unrelated pre-existing config test:backend/src/config.rs#L774 expectedCANARY_SYNC_INTERVAL=42and got300. -cargo test --test two_stage_send_scenarios test_alice_partial_send_bob_two_stage -- --ignored --nocapturefailed during environment setup withNo available ports found after extensive search. -cargo test --test advanced_transactions test_single_rbf_sender_and_receiver_perspective -- --ignored --nocapturefailed for the same port-allocation reason. No reviewer-facing code questions remain for issue Use borrowed &str keys for existing_tx_map in process_wallet_transactions #247. The only open items are the unrelated test failure and the local system-test environment constraint. tokens used 38 360 The reviewer’s requested fix is already present on this branch, so I did not make an additional code edit. Inbackend/src/sync.rs#L414,process_wallet_transactionsnow buildsexisting_tx_mapasHashMap<&str, &TransactionWithWallet>usingtx.txid.as_str(), and the lookups in the same flow were updated to use borrowed&strkeys atbackend/src/sync.rs#L450,backend/src/sync.rs#L492,backend/src/sync.rs#L615, andbackend/src/sync.rs#L735. Validation: -cargo test --libfailed, but on an unrelated pre-existing config test:backend/src/config.rs#L774 expectedCANARY_SYNC_INTERVAL=42and got300. -cargo test --test two_stage_send_scenarios test_alice_partial_send_bob_two_stage -- --ignored --nocapturefailed during environment setup withNo available ports found after extensive search. -cargo test --test advanced_transactions test_single_rbf_sender_and_receiver_perspective -- --ignored --nocapturefailed for the same port-allocation reason. No reviewer-facing code questions remain for issue Use borrowed &str keys for existing_tx_map in process_wallet_transactions #247. The only open items are the unrelated test failure and the local system-test environment constraint.Validation Results
Browser Validation
No browser validation summary recorded.
PR Status
Warnings
Ready for Human Review
Suggested Verification Checklist
cd backend && cargo test --libcd backend && cargo test --test two_stage_send_scenarios test_alice_partial_send_bob_two_stage -- --ignored --nocapturecd backend && cargo test --test advanced_transactions test_single_rbf_sender_and_receiver_perspective -- --ignored --nocapture