Untitled

 avatar
unknown
plain_text
2 years ago
960 B
4
Indexable
//Create a blockchain genesis file(.json) where the blockchain name is 'Test' and the difficulty is 2 and the user 'Mustafa' has 1000 coins('TestCoin').
//
//The genesis file should be in the following format:
//
// {
// 	"Name": "Test",
// 	"Difficulty": 2,
// 	"Users": [
// 		{
// 			"Name": "Mustafa",
// 			"Coins": 1000
// 		}
// 	]
// }
//
//The blockchain should be created in the following format:
//
// {
// 	"Name": "Test",
// 	"Difficulty": 2,
// 	"Users": [
// 		{
// 			"Name": "Mustafa",
// 			"Coins": 1000
// 		}
// 	],
// 	"Blocks": [
// 		{
// 			"Index": 0,
// 			"Timestamp": "2018-01-01 00:00:00",
// 			"Transactions": [
// 				{
// 					"Sender": "Mustafa",
// 					"Receiver": "Mustafa",
// 					"Amount": 1000
// 				}
// 			],
// 			"Nonce": 0,
// 			"Hash": "0000000000000000000000000000000000000000000000000000000000000000",
// 			"PrevHash": "0000000000000000000000000000000000000000000000000000000000000000"
// 		}
// 	]
// }
//
Editor is loading...