From the course: Blockchain Programming in iOS Using Swift

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

The longest chain

The longest chain

- [Instructor] Hello and welcome back. Now, I know that you are really eager to get started, but I just have one more small thing that I need to cover before we can jump into the implementation of the blockchain in iOS. And this lecture is about the longest chain. Let's actually see what longest chain is all about. We already know that the blockchain is just a connected view of the blocks, so you have different blocks and they are connected together using the previous hash of the previous block, along with the transactions, along with the index, the nonce, and a bunch of other stuff. When all these blocks are connected together, they form a blockchain. But let's talk about the different nodes. So once the block is actually found and it has been validated by these nodes, that block then becomes part of the blockchain. But what happens if there is some evil node, the node that has been hacked and that is also creating, that's also finding that secret hash value, hence generating the…

Contents