git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: 8716d3e0c84403a10b8fd9d5199ae126cb8f8577

Files: 8716d3e0c84403a10b8fd9d5199ae126cb8f8577 / fakeBlockChain.js

303 bytesRaw
1const utils = require('ethereumjs-util')
2const U256 = require('fixed-bn.js').U256
3
4module.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