-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Glebegor/test
Test
- Loading branch information
Showing
12 changed files
with
165 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,8 @@ | |
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Logger\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using BCAT.Entities.Commons.Clients; | ||
|
||
namespace BCAT.Bootstrap; | ||
|
||
public class App | ||
{ | ||
public static Client client; | ||
|
||
public static void SetClient() | ||
{ | ||
int choise; | ||
Console.WriteLine("Starting of the Client..."); | ||
Console.WriteLine("1. Node"); | ||
Console.WriteLine("2. Mining Node"); | ||
Console.WriteLine("3. Miner"); | ||
Console.WriteLine("4. Wallet"); | ||
choise = Convert.ToInt32(Console.ReadLine()); | ||
switch (choise) | ||
{ | ||
case 1: | ||
Console.WriteLine("You are Node"); | ||
client = new NodeCL(); | ||
break; | ||
case 2: | ||
Console.WriteLine("You are Mining Node"); | ||
client = new NodeMining(); | ||
break; | ||
case 3: | ||
Console.WriteLine("You are Miner"); | ||
client = new MinerCL(); | ||
break; | ||
case 4: | ||
Console.WriteLine("You are Wallet"); | ||
client = new WalletCL(); | ||
break; | ||
default: | ||
Console.WriteLine("Invalid choise"); | ||
break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using BCAT.Entities.Enums; | ||
|
||
namespace BCAT.Entities.Commons.Clients; | ||
|
||
public abstract class Client | ||
{ | ||
public string host; | ||
public string port; | ||
|
||
public abstract void Run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace BCAT.Entities.Commons.Clients; | ||
|
||
public class MinerCL : Client | ||
{ | ||
public override void Run() | ||
{ | ||
// Function to run mining server | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace BCAT.Entities.Commons.Clients; | ||
|
||
public class NodeMining : Client | ||
{ | ||
public override void Run() | ||
{ | ||
// Function to run server of the node mining | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace BCAT.Entities.Commons.Clients; | ||
|
||
public class NodeCL : Client | ||
{ | ||
public List<string> nodesInNetwork; | ||
public List<string> nodesMiningInNetwork; | ||
public List<string> miningsInNetwork; | ||
public List<string> walletsInNetwork; | ||
public Blockchain blockchain; | ||
|
||
public NodeCL() | ||
{ | ||
nodesInNetwork = new List<string>(); | ||
nodesMiningInNetwork = new List<string>(); | ||
miningsInNetwork = new List<string>(); | ||
walletsInNetwork = new List<string>(); | ||
blockchain = new Blockchain(); | ||
} | ||
|
||
public void UpdateData() | ||
{ | ||
// Here need to be function that will update data from blockchain network | ||
} | ||
public override void Run() | ||
{ | ||
// Function to run server of the node | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace BCAT.Entities.Commons.Clients; | ||
|
||
public class WalletCL : Client | ||
{ | ||
public override void Run() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace BCAT.Entities.Commons; | ||
|
||
public class NFT | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace BCAT.Entities.Enums; | ||
|
||
public enum ClientTypes | ||
{ | ||
Node, | ||
NodeMining, | ||
Mining, | ||
Wallet | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters