Closed neurofluxation closed 6 years ago
you can count the number of blocks to have the number of pieces and in the config file to fix the maximum of coins to generate. then if max == number of pieces (counted) then reward == 0 finally something in the genre
@demenvil. Awesome, thanks. Final question (promise), where would I go about saving additional data into the blockchain (such as a JSON stringified object)?
I think you will only need to add a new property to the transaction model.
hmm, I think I understand - so say, the client "wallet" updated some data client-side and wanted to send it back over to the block chain - how would I retrieve the data from the client in the node server to save? Would I have to create a transaction?
Perhaps I'm misunderstanding though :)
Thanks for the quick response!
So... New data -> JSON'd -> Sent to Node -> Save in block chain transaction
Is that correct? I'm not sure how to send to (and pick up data from) the node server though :(
First, you will need to study the source-code and add a field to the transaction model that will receive a JSON/Object data. So after implementing this, the idea is that through a transaction you can store some data in the blockchain. Then, to retrieve this data, you need to get the transaction inside the blockchain.
Was I able to explain?
Best
@conradoqg - Yeah that makes sense :) I figured it out - Thank you!
Hey there,
Love the code, just wondered whether they was a way to implement a maximum coin total? So a hardcoded total number of coins that are available before the mining has to stop?