ece496-blockchain-capstone-team / ece496-blockchain-simulator

Repository for the code for blockchain simulator capstone project
MIT License
2 stars 1 forks source link

Initial Host class #10

Closed dkhl65 closed 2 years ago

dkhl65 commented 2 years ago

Closes #2 Removed all temporary demo code from the Network page because of changes to the HostObj functions. Removed brodcastTransaction and takeAction because I think that it should be up to the Network class (central authority for the simulation) to keep track of time and handle the propagation of information between hosts. The Actions class is used to keep a log of actions for each host.

dkhl65 commented 2 years ago

I decided to delete the HostRole class and replace it with a static enum inside the Host class so you can use Host.Role.General instead of 'general'. Let me know if this is better. There is no allowedTypes function, but there is no need to input a string. The type of role is restricted by the enum.