Skip to content

Commit

Permalink
When mining a block, give the previous hash!
Browse files Browse the repository at this point in the history
Thanks @Jaked222
  • Loading branch information
Savjee committed Jan 31, 2018
1 parent 9ebadad commit 552d7ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main-v3.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Blockchain{
}

minePendingTransactions(miningRewardAddress){
let block = new Block(Date.now(), this.pendingTransactions);
let block = new Block(Date.now(), this.pendingTransactions, this.getLatestBlock().hash);
block.mineBlock(this.difficulty);

console.log('Block successfully mined!');
Expand Down

0 comments on commit 552d7ce

Please sign in to comment.