Skip to content

Commit 1e6d689

Browse files
committed
Fix dht findpeer api
1 parent d6879d2 commit 1e6d689

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/io/ipfs/api/IPFS.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ public Map query(MultiAddress addr) throws IOException {
387387
return retrieveMap("dht/query?arg=" + addr.toString());
388388
}
389389

390-
public Map findpeer(MultiAddress addr) throws IOException {
391-
return retrieveMap("dht/findpeer?arg=" + addr.toString());
390+
public Map findpeer(Multihash id) throws IOException {
391+
return retrieveMap("dht/findpeer?arg=" + id.toString());
392392
}
393393

394394
public Map get(Multihash hash) throws IOException {

src/test/java/io/ipfs/api/APITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ public void dhtTest() throws IOException {
589589
Map findprovs = ipfs.dht.findprovs(pointer);
590590
List<Peer> peers = ipfs.swarm.peers();
591591
Map query = ipfs.dht.query(peers.get(0).address);
592-
// Map find = ipfs.dht.findpeer(peers.get(0));
592+
Map find = ipfs.dht.findpeer(peers.get(0).id);
593593
}
594594

595595
@Test

0 commit comments

Comments
 (0)