Novice to Coin Part 2 - Transactions
We left off with an immutable data structure storing arbitrary data, you can read about that in part one , or you can view the introduction to this series here . As always, the companion code for this post can be found on GitHub. In this post, we'll introduce transactions which are the primary feature needed to convert that data into a currency. Although a transaction simply needs to subtract coins from one account and add them to another, the way this is implemented in a blockchain is a little unusual. We'll cover all these details and more during this article before implementing them in the LynxCoin project. This is what we'll be working towards today. The first thing you need to understand about currencies stored on a blockchain is that there is no concept of a balance. Instead, you hold rights to transactions. Specifically, if you received a transaction for 50 LynxCoins, you now have the right to spend them. Our updated block looks like this. ...