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):
2929 self .node_id = str (uuid4 ()).replace ('-' , '' )
3030 self .create_block (0 , '00' ) # Create genesis block
3131
32- # https://stackoverflow.com/a/53993037/4443012
3332 def register_node (self , node_url ):
3433 parsed_url = urlparse (node_url )
3534 if parsed_url .netloc :
@@ -40,9 +39,6 @@ def register_node(self, node_url):
4039 raise ValueError ('Invalid URL' )
4140
4241 def create_block (self , nonce , previous_hash ):
43- """
44- Add a block of transactions to the blockchain
45- """
4642 block = {'block_number' : len (self .chain ) + 1 ,
4743 'timestamp' : time (),
4844 'transactions' : self .transactions ,
@@ -285,10 +281,6 @@ def register_node():
285281 return jsonify (response ), 200
286282
287283
288- # TODO: consider implementing DIFFICULTY function
289- # TODO: consider implementing MINING_REWARD function
290-
291-
292284if __name__ == '__main__' :
293285 from argparse import ArgumentParser
294286
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ <h4 class="card-title">Add Blockchain nodes</h4>
5050 < div class ="row ">
5151 < label class ="col-sm-2 "> Node URLs:</ label >
5252 < 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 ">
5454 </ div >
5555 </ div >
5656
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ <h4 class="card-title">Send MonoCoins:</h4>
5454 < div class ="row ">
5555 < label class ="col-sm-2 "> Sender Public Key:</ label >
5656 < 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 ="">
5858 </ div >
5959 </ div >
6060
@@ -63,7 +63,7 @@ <h4 class="card-title">Send MonoCoins:</h4>
6363 < div class ="row ">
6464 < label class ="col-sm-2 "> Sender Private Key:</ label >
6565 < 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 ="">
6767 </ div >
6868 </ div >
6969
@@ -72,7 +72,7 @@ <h4 class="card-title">Send MonoCoins:</h4>
7272 < div class ="row ">
7373 < label class ="col-sm-2 "> Recipient Public Key:</ label >
7474 < 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 ="">
7676 </ div >
7777 </ div >
7878
You can’t perform that action at this time.
0 commit comments