Select Git revision
MassWalletConfiguration.java
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
MassWalletConfiguration.java 1.07 KiB
package fucoin.configurations;
import fucoin.actions.transaction.ActionNotifyObserver;
import fucoin.configurations.internal.ConfigurationName;
/**
* This configuration spawns 200 wallets to demonstrate the spawning of many headless wallets
*/
@ConfigurationName("Lots of Wallets")
public class MassWalletConfiguration extends AbstractConfiguration {
private boolean runRandomTransactions = false;
@Override
public void run() {
initSupervisor();
try {
spawnWallets(20, false);
System.out.println("Wallet spawning done!");
Thread.sleep(4000);
} catch (Exception e) {
System.out.println("Wallet spawning timed out!");
}
remainingTransactions = 100;
runRandomTransactions = true;
nextRandomTransaction();
//randomTransactions(100, 10);
}
@Override
public void onReceive(Object message) {
if (message instanceof ActionNotifyObserver && runRandomTransactions) {
nextRandomTransaction();
}
super.onReceive(message);
}
}