Files: 4abc5f9ec71beac0381b08cc3d09a60d65be1856 / fakeBlockChain.js
304 bytesRaw
1 | const utils = require('ethereumjs-util') |
2 | const U256 = require('fixed-bn.js').U256 |
3 | |
4 | module.exports = { |
5 | getBlock: (n) => { |
6 | const hash = utils.sha3(Buffer.from(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