PeerGroup: create a context as a convenience for apps that mainly operate on a PeerGroup

This commit is contained in:
Andreas Schildbach 2022-08-01 01:41:09 +02:00
parent 02aa41e254
commit 03687a807e

View file

@ -352,6 +352,7 @@ public class PeerGroup implements TransactionBroadcaster {
*/
protected PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager) {
checkNotNull(params);
Context.getOrCreate(); // create a context for convenience
this.params = params;
this.chain = chain;
fastCatchupTimeSecs = params.getGenesisBlock().getTimeSeconds();