Skip to content

Commit 730f6f0

Browse files
committed
Revise doc comments, remove commented out test
1 parent 968c61d commit 730f6f0

File tree

2 files changed

+3
-41
lines changed

2 files changed

+3
-41
lines changed

trustchain-ion/src/resolver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub struct HTTPTrustchainResolver<T: DIDResolver + Sync + Send, U = FullClient>
2727
}
2828

2929
impl<T: DIDResolver + Sync + Send> HTTPTrustchainResolver<T, FullClient> {
30-
/// Constructs a Trustchain resolver.
30+
/// Constructs a full client Trustchain resolver.
3131
pub fn new(resolver: T) -> Self {
3232
Self {
3333
wrapped_resolver: resolver,
@@ -41,7 +41,7 @@ impl<T: DIDResolver + Sync + Send> HTTPTrustchainResolver<T, FullClient> {
4141
}
4242

4343
impl<T: DIDResolver + Sync + Send> HTTPTrustchainResolver<T, LightClient> {
44-
/// Constructs a Trustchain resolver.
44+
/// Constructs a light client Trustchain resolver.
4545
pub fn new(resolver: T) -> Self {
4646
Self {
4747
wrapped_resolver: resolver,

trustchain-ion/src/verifier.rs

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ where
309309
T: Send + Sync + DIDResolver,
310310
{
311311
/// Constructs a new IONVerifier.
312+
// TODO: consider refactor to remove resolver from API
312313
pub fn with_endpoint(resolver: HTTPTrustchainResolver<T, LightClient>, endpoint: URL) -> Self {
313314
Self {
314315
resolver,
@@ -574,45 +575,6 @@ mod tests {
574575

575576
const ENDPOINT: &str = "http://localhost:3000/";
576577

577-
// #[tokio::test]
578-
// #[ignore = "Integration test requires MongoDB"]
579-
// async fn test_locate_transaction() {
580-
// let resolver = get_http_resolver();
581-
// let target = IONVerifier::new(resolver);
582-
583-
// let did = "did:ion:test:EiDYpQWYf_vkSm60EeNqWys6XTZYvg6UcWrRI9Mh12DuLQ";
584-
// let (block_hash, transaction_index) = target.locate_transaction(did).await.unwrap();
585-
// // Block 1902377
586-
// let expected_block_hash =
587-
// BlockHash::from_str("00000000e89bddeae5ad5589dfa4a7ea76ad9c83b0d711b5e6d4ee515ace6447")
588-
// .unwrap();
589-
// assert_eq!(block_hash, expected_block_hash);
590-
// assert_eq!(transaction_index, 118);
591-
592-
// let did = "did:ion:test:EiCClfEdkTv_aM3UnBBhlOV89LlGhpQAbfeZLFdFxVFkEg";
593-
// let (block_hash, transaction_index) = target.locate_transaction(did).await.unwrap();
594-
// // Block 2377445
595-
// let expected_block_hash =
596-
// BlockHash::from_str("000000000000000eaa9e43748768cd8bf34f43aaa03abd9036c463010a0c6e7f")
597-
// .unwrap();
598-
// assert_eq!(block_hash, expected_block_hash);
599-
// assert_eq!(transaction_index, 3);
600-
601-
// let did = "did:ion:test:EiBP_RYTKG2trW1_SN-e26Uo94I70a8wB4ETdHy48mFfMQ";
602-
// let (block_hash, transaction_index) = target.locate_transaction(did).await.unwrap();
603-
// // Block 2377339
604-
// let expected_block_hash =
605-
// BlockHash::from_str("000000000000003fadd15bdd2b55994371b832c6251781aa733a2a9e8865162b")
606-
// .unwrap();
607-
// assert_eq!(block_hash, expected_block_hash);
608-
// assert_eq!(transaction_index, 10);
609-
610-
// // Invalid DID
611-
// let invalid_did = "did:ion:test:EiCClfEdkTv_aM3UnBBh10V89L1GhpQAbfeZLFdFxVFkEg";
612-
// let result = target.locate_transaction(invalid_did).await;
613-
// assert!(result.is_err());
614-
// }
615-
616578
#[test]
617579
#[ignore = "Integration test requires Bitcoin RPC"]
618580
fn test_op_return_cid() {

0 commit comments

Comments
 (0)