Advertisement
Guest User

Untitled

a guest
Aug 5th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. NetworkParameters params = TestNet3Params.get();
  2. String filePrefix = "forwarding-service";
  3. String dir = getFilesDir().getPath().toString();
  4. kit = new WalletAppKit(params, new File(dir), filePrefix) {
  5. @Override
  6. protected void onSetupCompleted() {
  7. // This is called in a background thread after startAndWait is called, as setting up various objects
  8. // can do disk and network IO that may cause UI jank/stuttering in wallet apps if it were to be done
  9. // on the main thread.
  10.  
  11.  
  12. if (wallet().getKeychainSize() < 1)
  13. wallet().importKey(new ECKey());
  14.  
  15.  
  16. }
  17. };
  18. // Download the block chain and wait until it's done.
  19. kit.setAutoSave(true);
  20. kit.startAsync();
  21. kit.awaitRunning();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement