Skip to content

Commit 3ee41bb

Browse files
dcgclaude
authored andcommitted
fix(dash-spv): partial test compilation fixes
Fixed several test compilation issues: - Fixed create_mock_mn_list_diff reference in validation_test.rs - Replaced ValidationMode::CheckpointsOnly with ValidationMode::Basic - Fixed ClientConfig builder pattern (removed with_max_peers) - Fixed WatchItem::Address structure (removed label field) Note: 227 test compilation errors remain due to API changes. These will require more extensive refactoring in a future commit. Main code still compiles and baseline sync verified: Headers: 1306357 🤖 Generated with Claude Code: https://claude.ai/code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bc68bd2 commit 3ee41bb

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

dash-spv/src/client/config_test.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mod tests {
6666

6767
let config = ClientConfig::mainnet()
6868
.with_storage_path(path.clone())
69-
.with_validation_mode(ValidationMode::CheckpointsOnly)
69+
.with_validation_mode(ValidationMode::Basic)
7070
.with_connection_timeout(Duration::from_secs(10))
7171
.with_read_timeout(Duration::from_secs(5))
7272
.with_log_level("debug")
@@ -82,7 +82,7 @@ mod tests {
8282

8383
assert_eq!(config.storage_path, Some(path));
8484
assert!(config.enable_persistence);
85-
assert_eq!(config.validation_mode, ValidationMode::CheckpointsOnly);
85+
assert_eq!(config.validation_mode, ValidationMode::Basic);
8686
assert_eq!(config.connection_timeout, Duration::from_secs(10));
8787
assert_eq!(config.read_timeout, Duration::from_secs(5));
8888
assert_eq!(config.log_level, "debug");
@@ -269,7 +269,9 @@ mod tests {
269269

270270
#[test]
271271
fn test_clone_config() {
272-
let original = ClientConfig::mainnet().with_max_peers(16).with_log_level("debug");
272+
let mut original = ClientConfig::mainnet();
273+
original.max_peers = 16;
274+
original = original.with_log_level("debug");
273275

274276
let cloned = original.clone();
275277

dash-spv/src/client/watch_manager_test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ mod tests {
294294
let address = create_test_address();
295295
let item = WatchItem::Address {
296296
address: address.clone(),
297-
label: Some("Test Wallet".to_string()),
297+
earliest_height: None,
298298
};
299299

300300
let result = WatchManager::add_watch_item(
@@ -313,11 +313,11 @@ mod tests {
313313
assert_eq!(items.len(), 1);
314314
let stored_item = items.iter().next().unwrap();
315315
if let WatchItem::Address {
316-
label,
316+
earliest_height,
317317
..
318318
} = stored_item
319319
{
320-
assert_eq!(label.as_deref(), Some("Test Wallet"));
320+
assert_eq!(*earliest_height, None);
321321
} else {
322322
panic!("Expected Address watch item");
323323
}

dash-spv/src/sync/validation_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ mod perf_tests {
232232

233233
// Add 1000 diffs
234234
for i in 0..1000 {
235-
qr_info.mn_list_diff_list.push(super::create_mock_mn_list_diff(i));
235+
qr_info.mn_list_diff_list.push(create_mock_mn_list_diff(i));
236236
}
237237

238238
let duration = start.elapsed();

0 commit comments

Comments
 (0)