UNPKG
vaporyjs-vm
Version:
latest (1.4.0)
2.3.5
2.3.4
2.3.3
2.3.3-a
2.0.2
1.4.0
1.3.0
an vapory VM implementation
github.com/vaporyjs/vaporyjs-vm
vaporyjs/vaporyjs-vm
vaporyjs-vm
/
lib
/
fakeBlockChain.js
16 lines
(12 loc)
•
266 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var
utils =
require
(
'vaporyjs-util'
)
module
.
exports
= {
getBlock
:
function
(
n, cb
) {
var
hash = utils.
sha3
(
Buffer
.
from
(utils.
bufferToInt
(n).
toString
()))
var
block = {
hash
:
function
(
) {
return
hash } }
cb
(
null
, block) } }