-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.java
23 lines (20 loc) · 865 Bytes
/
Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
public class Test {
public static void main(String[] args) throws InvalidKeyException, NoSuchAlgorithmException, SignatureException {
// Creating peers.
Peer.peers = new Peer[4];
for (int i = 0; i < 4; i++) {
Peer.peers[i] = new Peer();
System.out.println("Get peer environment dependency status: " + Peer.peers[i].getEnvStatus());
}
// Now, our blockchain is ready for new blocks being added
// so all peers start sending transactions back and forth, mining, etc.
for (int i = 0; i < 4; i++) {
Peer.peers[i].startConsumer();
Peer.peers[i].startServer();
Peer.peers[i].startPeerTransactions();
}
}
}