Last 12 weeks · 0 commits
1 of 6 standards met
The idea for the genesis block is to get currency into the system by adding a transaction to some specified wallet. In this case (I see what you did there). So needs to first send transactions to the other wallets, so they have currency as well. That theoretically happens in line 125-127 BUT it does NOT! What I mean by that, is that the amount they held is never taken into account. Also there would be no currency in the system since the transaction in the genesis block to should contain the public key of satoshi instead.
Repository: fireship-io/node-blockchain. Description: Blockchain Cryptocurrency Implemented with Node & TypeScript Stars: 521, Forks: 160. Primary language: TypeScript. Languages: TypeScript (100%). Open PRs: 2, open issues: 5. Last activity: 5y ago. Community health: 25%. Top contributors: codediodeio.
The sender's public key can be found in the transaction instance, there's no need to give it to the function as a separate argument.
It's a good project for me who want to learn the block chain.But there's a confused point that I can't figure out,the function "mine" seems no meanings when we use the addBlock.It does not reflect the relationship between mining and block.Then I think the return value of "mine" should be nonce+solution,and assign the return value to the nonce of block. `