I am attempting to create my own blockchain, in order to understand how they work. I wanted to know how big the nonce should be (e.g. 8 digits or something like that). I am using a PoW (proof-of-work) algorithm in my blockchain. This blockchain uses the SHA256 hashing algorithm.
I am using the C programming language in order to implement this blockchain.
Here is what the block looks like in code:
struct Block { /*Block structure*/ char* hash; char* prev_hash; char* from; char* to; long long int nonce; double amount; time_t timestamp; };
#c #blockchain #cryptocurrency