udacity / blockchain-nanodegree-issues

Issues for Udacity's Blockchain Nanodegree program
2 stars 2 forks source link

Error in example code in Blockchain Data -> Lesson 5: Private Blockchains -> 10. Block Height and Timestamp #147

Closed liamseanbrady closed 5 years ago

liamseanbrady commented 5 years ago

In the code example there is the following line:

newBlock.previousHash = this.chain(this.chain.length-1.hash;

It seems like this line should actually be

newBlock.previousHash = this.getLatestBlock().hash;

Link to page: https://classroom.udacity.com/nanodegrees/nd1309/parts/31b86083-85e4-43ae-b154-6905b461f2c1/modules/0af5bc78-b446-4b60-b9cd-8659536cd59f/lessons/bad0043c-5c20-4201-a7c7-4112d3253f6c/concepts/7699055d-0dd0-4261-b045-78eba3513315

Thanks!

jperera84 commented 5 years ago

Fixed, thanks