Skip to content

Commit 74dce1a

Browse files
docs: compact code comments per review feedback
1 parent 0eeee6f commit 74dce1a

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

crates/e2e-tests/src/foreign_chain_mock.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ use httpmock::prelude::*;
99
use httpmock::{HttpMockRequest, HttpMockResponse};
1010

1111
/// Client credentials a mock server requires, mirroring the node's
12-
/// [`AuthConfig`](mpc_node_config::AuthConfig) kinds. Requests without the
13-
/// expected credentials are answered with 401 like real providers do, so
14-
/// verification can only succeed if the node applied the configured
15-
/// authentication.
12+
/// [`AuthConfig`](mpc_node_config::AuthConfig) kinds.
1613
#[derive(Clone, Debug)]
1714
pub enum MockAuthExpectation {
1815
None,
@@ -34,8 +31,6 @@ impl MockAuthExpectation {
3431

3532
/// Rejects requests missing the expected credentials the way real providers
3633
/// do.
37-
/// Must be registered AFTER the credentialed mock — httpmock picks the
38-
/// first-registered matching mock, so authenticated requests keep hitting it.
3934
fn register_unauthorized_catch_all(server: &MockServer, auth: &MockAuthExpectation) {
4035
if matches!(auth, MockAuthExpectation::None) {
4136
return;

crates/e2e-tests/tests/foreign_chain_tx_validation.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -541,15 +541,10 @@ async fn verify_polygon(env: &ForeignTxTestEnv) -> anyhow::Result<()> {
541541
verify_foreign_tx_response(&outcome)
542542
}
543543

544-
/// Sets up a single 2-node cluster with mock RPC servers for all chains,
545-
/// then submits verify_foreign_transaction requests for Bitcoin, Abstract,
546-
/// BNB, Base, Starknet, Arbitrum, HyperEVM, and Polygon and verifies the MPC
547-
/// nodes return valid signed responses. Also verifies rejection for unsupported
548-
/// chains and non-existent domains.
549-
///
550-
/// Bitcoin, Base and BNB providers require authentication (one per
551-
/// credential-carrying [`AuthConfig`] kind), so the test also proves the node
552-
/// applies configured RPC credentials end to end.
544+
/// Verifies all supported chains sign, and unsupported chains and non-existent
545+
/// domains are rejected. Bitcoin, Base and BNB require authentication (one per
546+
/// credential-carrying [`AuthConfig`] kind), proving the node applies configured
547+
/// RPC credentials end to end.
553548
#[tokio::test]
554549
#[expect(non_snake_case)]
555550
async fn verify_foreign_transaction__should_sign_all_supported_chains() {

0 commit comments

Comments
 (0)