-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRIMAS.cpp
60 lines (44 loc) · 1.04 KB
/
RIMAS.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include <iostream>
#include <vector>
#include "header/create_transaction.h"
#include "header/basic_methods.h"
using namespace std;
// --- Global Definations ---//
vector<string> users { "RAUNAK","IRA","MUSKAN","AKSHAT","SRISHTI" };
vector<long long int> y { 65536,97215,78217,9438,4458 };
vector<int> wallet { 10000,10000,10000,10000,10000 };
int plotnumber[101];
// y is the value of (g^x mod p);
int main()
{
createGenesis();
while(1)
{
int n = askFunctionality();
system("clear");
if (n == 1)
{
int user_index = transactionCreate(users,y);
transaction(user_index, users, wallet, plotnumber);
}
else if (n == 2)
{
display();
}
else if (n == 3)
{
int m = verify_bc();
if (m == 2)
cout << "---------------------------Block Chain Verified-------------------------------\n\n" << endl;
else
cout << "Block Chain Not Verified\n\n" << endl;
}
else if (n == 4)
return 0;
else
{
cout << "Enter Valid Choice" << endl;
}
}
return 0;
}