Bitcoin Forum

Bitcoin => BitcoinJ => Topic started by: Apocalipsis on March 03, 2014, 08:55:10 AM



Title: Peers instead of DNSSeed
Post by: Apocalipsis on March 03, 2014, 08:55:10 AM
Hi)
I want to know,how can I use a Ip of node,but not just DNSSeed link.
According to this thread
https://bitcointalk.org/index.php?topic=290308.0
,I have to change parameters from this
Code:
vPeerGroup.addPeerDiscovery(new SeedPeers(params));

to this
Code:
vPeerGroup.addPeerDiscovery(new DnsDiscovery(params));
It's ok,but I can't find in source code,where I should write IP addresses of nodes(ex.54.xxx.xxx.33:55884,or without ,just 54.xxx.xxx.33)
And I want to repeat,I want to use Nodes,not DNSSeeders.
Thank you to all in advance!


Title: Re: Peers instead of DNSSeed
Post by: Mike Hearn on March 03, 2014, 11:18:09 PM
I think you want:

PeerGroup.addAddress(InetAddress) (http://plan99.net/~mike/bitcoinj/current/com/google/bitcoin/core/PeerGroup.html#addAddress(java.net.InetAddress))


Title: Re: Peers instead of DNSSeed
Post by: Apocalipsis on March 04, 2014, 09:44:14 AM
I think you want:

PeerGroup.addAddress(InetAddress) (http://plan99.net/~mike/bitcoinj/current/com/google/bitcoin/core/PeerGroup.html#addAddress(java.net.InetAddress))

So,if I put it in the source code,I can to write "nodes ip" into the source.(ip that I write in /datadir/bitcoin/bitcoin.conf)
?