use of snowblossom.lib.NetworkParamsRegShard in project snowblossom by snowblossomcoin.
the class ShardTestFullClaw method shardTest.
@Test
public void shardTest() throws Exception {
File snow_path = setupSnow("regshard");
Random rnd = new Random();
int port = 20000 + rnd.nextInt(30000);
SnowBlossomNode node = startNode(port, "regshard");
Thread.sleep(100);
KeyPair key_pair = KeyUtil.generateECCompressedKey();
AddressSpec claim = AddressUtil.getSimpleSpecForKey(key_pair.getPublic(), SignatureUtil.SIG_TYPE_ECDSA_COMPRESSED);
AddressSpecHash to_addr = AddressUtil.getHashForSpec(claim);
SnowBlossomMiner miner = startMiner(port, to_addr, snow_path, "regshard");
Thread.sleep(60000);
for (int i = 0; i <= Math.min(10, new NetworkParamsRegShard().getMaxShardId()); i++) {
waitForShardHead(node, i);
}
miner.stop();
Thread.sleep(500);
node.stop();
}
Aggregations