Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const Blockchain = require('./blockchain')
const blockchain = new Blockchain()
blockchain.addBlock({ amount: 4 })
blockchain.addBlock({ amount: 50 })
console.log(blockchain.isValid()) // true
blockchain.blocks[1].data.amount = 30000 // ataque malicioso
console.log(blockchain.isValid()) // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment