Browse Source

Add files via upload

master
Toromino 3 years ago
parent
commit
4eeb843c9e
No account linked to committer's email address
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      example_chain.py

+ 4
- 1
example_chain.py View File

@@ -1,10 +1,13 @@
1
-import time
1
+import os, time
2 2
 
3 3
 from block import Block
4 4
 from blockchain import Blockchain
5 5
 
6
+if not os.path.exists("blocks"):
7
+    os.makedirs("blocks")
6 8
 testBlockchain = Blockchain(4, 42)
7 9
 
10
+
8 11
 for i in range(100):
9 12
 
10 13
     block = Block(len(testBlockchain.chain), time.ctime())

Loading…
Cancel
Save