File tree Expand file tree Collapse file tree 3 files changed +4
-12
lines changed
blockchain_client/templates Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ def __init__(self):
29
29
self .node_id = str (uuid4 ()).replace ('-' , '' )
30
30
self .create_block (0 , '00' ) # Create genesis block
31
31
32
- # https://stackoverflow.com/a/53993037/4443012
33
32
def register_node (self , node_url ):
34
33
parsed_url = urlparse (node_url )
35
34
if parsed_url .netloc :
@@ -40,9 +39,6 @@ def register_node(self, node_url):
40
39
raise ValueError ('Invalid URL' )
41
40
42
41
def create_block (self , nonce , previous_hash ):
43
- """
44
- Add a block of transactions to the blockchain
45
- """
46
42
block = {'block_number' : len (self .chain ) + 1 ,
47
43
'timestamp' : time (),
48
44
'transactions' : self .transactions ,
@@ -285,10 +281,6 @@ def register_node():
285
281
return jsonify (response ), 200
286
282
287
283
288
- # TODO: consider implementing DIFFICULTY function
289
- # TODO: consider implementing MINING_REWARD function
290
-
291
-
292
284
if __name__ == '__main__' :
293
285
from argparse import ArgumentParser
294
286
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ <h4 class="card-title">Add Blockchain nodes</h4>
50
50
< div class ="row ">
51
51
< label class ="col-sm-2 "> Node URLs:</ label >
52
52
< div class ="col-sm-10 ">
53
- < input type ="text " name ="nodes " id ="nodes " rows ="2 " class ="form-control " value ="http://127.0.0.1:5002,http://127.0.0.1:5003 ">
53
+ < input type ="text " name ="nodes " id ="nodes " rows ="2 " class ="form-control " placeholder ="http://127.0.0.1:5002,http://127.0.0.1:5003 ">
54
54
</ div >
55
55
</ div >
56
56
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ <h4 class="card-title">Send MonoCoins:</h4>
54
54
< div class ="row ">
55
55
< label class ="col-sm-2 "> Sender Public Key:</ label >
56
56
< div class ="col-sm-10 ">
57
- < input type ="text " name ="sender_public_key " id ="sender_public_key " class ="form-control " value ="30819f300d06092a864886f70d010101050003818d00308189028181009f148fb25857801a51cb3a294af9707b27ce92e99a7c65604210a4675b855dc7166127a651bc2ae47f38ce726e3b9aeb978b869d67fb0b4ed24bfbd31c8cc8fb289a8f986eca64a993db4426f6307f307e3139d648d44ad7428b487a79642a2c43783f48bf60f9795a848f182459b14bb9c41553f4d3363732b7786eb2589d270203010001 ">
57
+ < input type ="text " name ="sender_public_key " id ="sender_public_key " class ="form-control " value ="">
58
58
</ div >
59
59
</ div >
60
60
@@ -63,7 +63,7 @@ <h4 class="card-title">Send MonoCoins:</h4>
63
63
< div class ="row ">
64
64
< label class ="col-sm-2 "> Sender Private Key:</ label >
65
65
< div class ="col-sm-10 ">
66
- < input type ="text " name ="sender_private_key " id ="sender_private_key " class ="form-control " value ="3082025c020100028181009f148fb25857801a51cb3a294af9707b27ce92e99a7c65604210a4675b855dc7166127a651bc2ae47f38ce726e3b9aeb978b869d67fb0b4ed24bfbd31c8cc8fb289a8f986eca64a993db4426f6307f307e3139d648d44ad7428b487a79642a2c43783f48bf60f9795a848f182459b14bb9c41553f4d3363732b7786eb2589d2702030100010281802fe976f00d9868fe445553b29d20ac8683323de03ac5ad98c4bd136f07cb0eb8081f01dc9f706f70bb7a85ff440112c35334d439f357d28b8e5e113dffb2cd531223a9953cba3ec686161a5efcd525c2547602e6842744b3e9a1ec7699acd712e98fd3b8bf8dea955d3c96ed3215c0182e20849e9442a0ff407428ae688ac19d024100bee78b28aea37545688d22b3a36e6683f36c028e5807f84a52af3ed6ad1baaf5c6c38dfc2f31f473c397a9dc1df0f78c36e2d06c4104a9bdaef5f855c15a506d024100d5530526b20748678caddc1335a717b047ebb6212e2a9ea0b2bfbe47a0bd156e006bf7ee2fbf09db18d945364e2850fb1237976a91249790b12337c8e095af630240303ab508811e60a93961b6aba59565a6de5fa241adf1cd8391621ec10398e2d716f11eb4e083815ba1c5762f5b0d1ead38cc929556d3c3c25d2a5d23e52658fd0241008d546a563f9e5996d8fa1a92d379f754bfe16711c67f5006d145fd6f810ba495f34b94bfc5fc40305adf1f5ea21b4dc379474156c6004336065579d0e911e2570240184189660cb1dde0a480792272a943fa25701fbc54f354a3469a8aa46d6283e8e308ea0d44226ea806954151d96d9e0c27e67c6798029708ed8b3fe2762e8966 ">
66
+ < input type ="text " name ="sender_private_key " id ="sender_private_key " class ="form-control " value ="">
67
67
</ div >
68
68
</ div >
69
69
@@ -72,7 +72,7 @@ <h4 class="card-title">Send MonoCoins:</h4>
72
72
< div class ="row ">
73
73
< label class ="col-sm-2 "> Recipient Public Key:</ label >
74
74
< div class ="col-sm-10 ">
75
- < input type ="text " name ="recipient_public_key " id ="recipient_public_key " class ="form-control " value ="30819f300d06092a864886f70d010101050003818d0030818902818100b08534b5ec4393d63ecbdb64e0d74f9c604b64f10e33fd6569fbd64322a66a17482a96251795db96ebb3aedb14aa8528b4c2970f9940f5c1042c23a96d20af61e0f5c5edb37fe3769017be2776e21fb6b678052b1879e4e524ed763ea0e7e807215bcc3f5053b5c22ffbbbabf5cab025152827601372d2a204cd5878a5bae9410203010001 ">
75
+ < input type ="text " name ="recipient_public_key " id ="recipient_public_key " class ="form-control " value ="">
76
76
</ div >
77
77
</ div >
78
78
You can’t perform that action at this time.
0 commit comments