Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jun 2, 2024
1 parent 846f9b3 commit 358cc3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cosmic_pi_network/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from cosmic_pi_network.artificial_intelligence import AIAgent
from cosmic_pi_network.cryptography import Crypto
from cosmic_pi_network.machine_learning import ReinforcementLearning
from cosmic_pi_network.blockchain import Blockchain

def main():
api = API()
Expand Down Expand Up @@ -71,5 +72,10 @@ def main():
rewards = reinforcement_learning.evaluate_agent(model, env)
print("Rewards:", rewards)

blockchain = Blockchain()
transactions = [{"from": "Alice", "to": "Bob", "amount": 10}, {"from": "Bob", "to": "Alice", "amount": 5}]
block, block_hash = blockchain.create_block(transactions, "0")
print("Block hash:", block_hash)

if __name__ == "__main__":
main()

0 comments on commit 358cc3d

Please sign in to comment.