Skip to content

Propagate full electrum pool errors#1017

Open
SihyeonJeon wants to merge 1 commit into
eigenwallet:masterfrom
SihyeonJeon:h12-propagate-electrum-pool-errors
Open

Propagate full electrum pool errors#1017
SihyeonJeon wants to merge 1 commit into
eigenwallet:masterfrom
SihyeonJeon:h12-propagate-electrum-pool-errors

Conversation

@SihyeonJeon
Copy link
Copy Markdown

Fixes #702.

Summary

  • preserve the full MultiError context when electrum-pool converts all failed attempts into the public electrum_client::Error
  • avoid dropping every failed server except the last one in call / call_async
  • add coverage proving the public error message includes both failing Electrum server URLs

Why

ElectrumBalancer::call_sync already records every failed attempt in MultiError, but the compatibility conversion into electrum_client::Error previously returned only the last error. That made the normal call and call_async paths lose the useful per-server failure details.

The new conversion keeps the existing public return type while wrapping the full MultiError display in the final I/O error.

Note on bitcoindevkit/rust-electrum-client#186: this is complementary to the upstream retry aggregation fix. If upstream returns a better AllAttemptsErrored, this change still keeps the electrum-pool aggregate from collapsing to a single server failure when exposed through call / call_async.

Tests

  • rustfmt --check --edition 2024 electrum-pool/src/lib.rs
  • cargo test -p electrum-pool test_call_preserves_all_errors_in_public_error
  • cargo test -p electrum-pool test_call_all_clients_fail
  • cargo test -p electrum-pool
  • cargo check -p electrum-pool
  • cargo clippy -p electrum-pool --all-targets -- -D warnings
  • git diff --check

Not run locally: full workspace checks. A broad cargo test --workspace --no-run attempt failed in the local monero-sys setup because the expected Monero C++ target file was absent in this clone.

AI assistance: OpenAI Codex helped prepare the initial patch and this PR draft. The diff and checks above were reviewed before submission.

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.

[0.1 XMR] Propagate full errors electrum-pool

1 participant