Make sure context is set after it is properly initialized

This commit is contained in:
Christian Basler 2017-01-11 17:30:04 +01:00
parent 732032b1b5
commit 3f8980e236
1 changed files with 3 additions and 3 deletions

View File

@ -66,13 +66,13 @@ public class BitmessageContext {
private final boolean sendPubkeyOnIdentityCreation;
private BitmessageContext(Builder builder) {
if (builder.listener instanceof Listener.WithContext) {
((Listener.WithContext) builder.listener).setContext(this);
}
ctx = new InternalContext(builder);
labeler = builder.labeler;
ctx.getProofOfWorkService().doMissingProofOfWork(30_000); // TODO: this should be configurable
sendPubkeyOnIdentityCreation = builder.sendPubkeyOnIdentityCreation;
if (builder.listener instanceof Listener.WithContext) {
((Listener.WithContext) builder.listener).setContext(this);
}
}
public AddressRepository addresses() {