1

In BitcoinJ, there is PeerGroup and Peer.

I understand there are differences such as one is related to a group of peers while other is related to a single peer.

When should I use which construct? Are both necessary?

From the code, it seems that we should only be interested in PeerGroup and not Peer. Then whats the purpose of Peer?

1 Answer 1

1

When should I use which construct?

Use PeerGroup, unless you want to connect to a specific Bitcoin node.

From the code, it seems that we should only be interested in PeerGroup and not Peer.

PeerGroup will construct Peer objects. It's necessary, even if you don't use it directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.