1 | const genesisData = require('ethereumjs-testing').tests.basicTests.genesishashestest
|
2 | const tape = require('tape')
|
3 | const Block = require('../')
|
4 |
|
5 | tape('[Common]: genesis hashes tests', function (t) {
|
6 | t.test('should generete the genesis correctly', function (st) {
|
7 | var blockGenesis = new Block()
|
8 | blockGenesis.setGenesisParams()
|
9 | var rlpGenesis = blockGenesis.serialize()
|
10 | st.strictEqual(rlpGenesis.toString('hex'), genesisData.genesis_rlp_hex, 'rlp hex mismatch')
|
11 | st.strictEqual(blockGenesis.hash().toString('hex'), genesisData.genesis_hash)
|
12 | st.end()
|
13 | })
|
14 | })
|