Skip to content

Commit db1866b

Browse files
committed
fix 0x issue in stRandom/*
1 parent 5024a79 commit db1866b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/BlockchainTestsRunner.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ module.exports = function runBlockchainTest (options, testData, t, cb) {
8484
},
8585
function getHead (done) {
8686
vm.blockchain.getHead(function (err, block) {
87+
if (testData.lastblockhash.substr(0,2) === '0x') {
88+
// fix for BlockchainTests/GeneralStateTests/stRandom/*
89+
testData.lastblockhash = testData.lastblockhash.substr(2)
90+
}
8791
t.equal(block.hash().toString('hex'), testData.lastblockhash, 'last block hash')
8892
// if the test fails, then block.header is the preState because
8993
// vm.runBlock has a check that prevents the actual postState from being

0 commit comments

Comments
 (0)