Propagate full electrum pool errors#1017
Open
SihyeonJeon wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #702.
Summary
MultiErrorcontext whenelectrum-poolconverts all failed attempts into the publicelectrum_client::Errorcall/call_asyncWhy
ElectrumBalancer::call_syncalready records every failed attempt inMultiError, but the compatibility conversion intoelectrum_client::Errorpreviously returned only the last error. That made the normalcallandcall_asyncpaths lose the useful per-server failure details.The new conversion keeps the existing public return type while wrapping the full
MultiErrordisplay 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 betterAllAttemptsErrored, this change still keeps theelectrum-poolaggregate from collapsing to a single server failure when exposed throughcall/call_async.Tests
rustfmt --check --edition 2024 electrum-pool/src/lib.rscargo test -p electrum-pool test_call_preserves_all_errors_in_public_errorcargo test -p electrum-pool test_call_all_clients_failcargo test -p electrum-poolcargo check -p electrum-poolcargo clippy -p electrum-pool --all-targets -- -D warningsgit diff --checkNot run locally: full workspace checks. A broad
cargo test --workspace --no-runattempt failed in the localmonero-syssetup 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.