Files: fe2d3d73d28c55f28860b137e3990bae31fbd26b / fakeBlockChain.js
301 bytesRaw
1 | const utils = require('ethereumjs-util') |
2 | const U256 = require('./deps/u256.js') |
3 | |
4 | module.exports = { |
5 | getBlock: (n) => { |
6 | const hash = utils.sha3(new Buffer(utils.bufferToInt(n).toString())) |
7 | const block = { |
8 | hash: () => { |
9 | return new U256(hash) |
10 | } |
11 | } |
12 | return block |
13 | } |
14 | } |
15 |
Built with git-ssb-web