Skip to content

Commit 7b39268

Browse files
committed
Network: fix wasm compilation error
1 parent bb0a8b7 commit 7b39268

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

network-libp2p/src/discovery/peer_contacts.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ pub struct PeerContactBook {
426426
Box<dyn Fn(PeerId, u64) -> TaggedSigned<ValidatorRecord<PeerId>, SchnorrKey> + Send + Sync>,
427427
>,
428428
/// Validator record verifier
429+
#[cfg(feature = "kad")]
429430
validator_record_verifier: Arc<dyn ValidatorRecordVerifier>,
430431
}
431432

@@ -469,6 +470,7 @@ impl PeerContactBook {
469470
memory_transport,
470471
validator_peer_ids: HashMap::new(),
471472
validator_record_signer: None,
473+
#[cfg(feature = "kad")]
472474
validator_record_verifier,
473475
}
474476
}
@@ -825,6 +827,7 @@ impl PeerContactBook {
825827
}
826828

827829
// Re-verify local_only contacts.
830+
#[cfg(feature = "kad")]
828831
if peer_contact.contact.local_only {
829832
let result = peer_contact
830833
.contact

0 commit comments

Comments
 (0)