Skip to content

Commit 3c872c9

Browse files
committed
fix await_holding_locks
1 parent b5a8bd7 commit 3c872c9

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

beacon_node/http_api/tests/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,6 +3508,7 @@ impl ApiTester {
35083508
self
35093509
}
35103510

3511+
#[allow(clippy::await_holding_lock)] // This is a test, so it should be fine.
35113512
pub async fn test_get_validator_aggregate_attestation(self) -> Self {
35123513
if self
35133514
.chain

testing/web3signer_tests/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,8 @@ mod tests {
175175
// Read a Github API token from the environment. This is intended to prevent rate-limits on CI.
176176
// We use a name that is unlikely to accidentally collide with anything the user has configured.
177177
let github_token = env::var("LIGHTHOUSE_GITHUB_TOKEN");
178-
download_binary(
179-
TEMP_DIR.lock().path().to_path_buf(),
180-
github_token.as_deref().unwrap_or(""),
181-
)
182-
.await;
178+
let dest_dir = TEMP_DIR.lock().path().to_path_buf();
179+
download_binary(dest_dir, github_token.as_deref().unwrap_or("")).await;
183180
})
184181
.await;
185182

validator_client/http_api/src/tests/keystores.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,8 +2147,11 @@ async fn import_remotekey_web3signer_enabled() {
21472147
// 1 validator imported.
21482148
assert_eq!(tester.vals_total(), 1);
21492149
assert_eq!(tester.vals_enabled(), 1);
2150-
let vals = tester.initialized_validators.read();
2151-
let web3_vals = vals.validator_definitions();
2150+
let web3_vals = tester
2151+
.initialized_validators
2152+
.read()
2153+
.validator_definitions()
2154+
.to_vec();
21522155

21532156
// Import remotekeys.
21542157
let import_res = tester
@@ -2165,11 +2168,13 @@ async fn import_remotekey_web3signer_enabled() {
21652168

21662169
assert_eq!(tester.vals_total(), 1);
21672170
assert_eq!(tester.vals_enabled(), 1);
2168-
let vals = tester.initialized_validators.read();
2169-
let remote_vals = vals.validator_definitions();
2171+
{
2172+
let vals = tester.initialized_validators.read();
2173+
let remote_vals = vals.validator_definitions();
21702174

2171-
// Web3signer should not be overwritten since it is enabled.
2172-
assert!(web3_vals == remote_vals);
2175+
// Web3signer should not be overwritten since it is enabled.
2176+
assert!(web3_vals == remote_vals);
2177+
}
21732178

21742179
// Remotekey should not be imported.
21752180
let expected_responses = vec![SingleListRemotekeysResponse {

0 commit comments

Comments
 (0)