Skip to content

Commit 133d716

Browse files
committed
Update broadcast validation tests
1 parent bcf3c28 commit 133d716

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

beacon_node/http_api/tests/broadcast_validation_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ pub async fn consensus_gossip() {
317317

318318
/* mandated by Beacon API spec */
319319
assert_eq!(error_response.status(), Some(StatusCode::BAD_REQUEST));
320-
assert_server_message_error(error_response, "BAD_REQUEST: Invalid block: StateRootMismatch { block: 0x0000000000000000000000000000000000000000000000000000000000000000, local: 0xfc675d642ff7a06458eb33c7d7b62a5813e34d1b2bb1aee3e395100b579da026 }".to_string());
320+
assert_server_message_error(error_response, "BAD_REQUEST: Invalid block: StateRootMismatch { block: 0x0000000000000000000000000000000000000000000000000000000000000000, local: 0x253405be9aa159bce7b276b8e1d3849c743e673118dfafe8c7d07c203ae0d80d }".to_string());
321321
}
322322

323323
/// This test checks that a block that is valid from both a gossip and consensus perspective, but nonetheless equivocates, is accepted when using `broadcast_validation=consensus`.
@@ -604,7 +604,7 @@ pub async fn equivocation_gossip() {
604604

605605
/* mandated by Beacon API spec */
606606
assert_eq!(error_response.status(), Some(StatusCode::BAD_REQUEST));
607-
assert_server_message_error(error_response, "BAD_REQUEST: Invalid block: StateRootMismatch { block: 0x0000000000000000000000000000000000000000000000000000000000000000, local: 0xfc675d642ff7a06458eb33c7d7b62a5813e34d1b2bb1aee3e395100b579da026 }".to_string());
607+
assert_server_message_error(error_response, "BAD_REQUEST: Invalid block: StateRootMismatch { block: 0x0000000000000000000000000000000000000000000000000000000000000000, local: 0x253405be9aa159bce7b276b8e1d3849c743e673118dfafe8c7d07c203ae0d80d }".to_string());
608608
}
609609

610610
/// This test checks that a block that is valid from both a gossip and consensus perspective but
@@ -1002,7 +1002,7 @@ pub async fn blinded_consensus_gossip() {
10021002

10031003
/* mandated by Beacon API spec */
10041004
assert_eq!(error_response.status(), Some(StatusCode::BAD_REQUEST));
1005-
assert_server_message_error(error_response, "BAD_REQUEST: Invalid block: StateRootMismatch { block: 0x0000000000000000000000000000000000000000000000000000000000000000, local: 0xfc675d642ff7a06458eb33c7d7b62a5813e34d1b2bb1aee3e395100b579da026 }".to_string());
1005+
assert_server_message_error(error_response, "BAD_REQUEST: Invalid block: StateRootMismatch { block: 0x0000000000000000000000000000000000000000000000000000000000000000, local: 0x253405be9aa159bce7b276b8e1d3849c743e673118dfafe8c7d07c203ae0d80d }".to_string());
10061006
}
10071007

10081008
/// This test checks that a block that is valid from both a gossip and consensus perspective is accepted when using `broadcast_validation=consensus`.
@@ -1212,7 +1212,7 @@ pub async fn blinded_equivocation_gossip() {
12121212
/* mandated by Beacon API spec */
12131213
assert_eq!(error_response.status(), Some(StatusCode::BAD_REQUEST));
12141214

1215-
assert_server_message_error(error_response, "BAD_REQUEST: Invalid block: StateRootMismatch { block: 0x0000000000000000000000000000000000000000000000000000000000000000, local: 0xfc675d642ff7a06458eb33c7d7b62a5813e34d1b2bb1aee3e395100b579da026 }".to_string());
1215+
assert_server_message_error(error_response, "BAD_REQUEST: Invalid block: StateRootMismatch { block: 0x0000000000000000000000000000000000000000000000000000000000000000, local: 0x253405be9aa159bce7b276b8e1d3849c743e673118dfafe8c7d07c203ae0d80d }".to_string());
12161216
}
12171217

12181218
/// This test checks that a block that is valid from both a gossip and

0 commit comments

Comments
 (0)