You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, the transaction rewardTx is not signed, so Transaction.signature is not set for it; this is in minePendingTransactions in blockchain.js.
Is that deliberate? Incidentally in classTransaction there is no constructor signature.
The text was updated successfully, but these errors were encountered:
Mining rewards aren't normal transactions, they create a new supply of coins. In this implementation, they're sent from a zero address to your wallet. And since you don't have the key for the zero address, you can't properly sign that transaction. But that should not be a problem. It would be up to the network to validate that you have given yourself the correct amount of coins as a reward for mining a block.
I'm not sure what you mean with your second question. The Transaction class has a method "signTransaction", which accepts a wallet key for signing. It then stores that signature in the object itself.
OK, that makes sense. I think this issue can be closed; it might be useful to copy and paste part of your reply in the code as a comment. Thanks for the clarification and great videos!
Hello, the transaction
rewardTx
is not signed, soTransaction.signature
is not set for it; this is inminePendingTransactions
inblockchain.js
.Is that deliberate? Incidentally in
class
Transaction
there is no constructorsignature
.The text was updated successfully, but these errors were encountered: