1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
var testname = "TEST_getBlockHashOnNode2 "; process.stdout.write(testname); var onResult = {}; web3.eth.getBlock("latest", function(err, res){ onResult(err, res); }) onResult = function (err,res) { if (res.hash == args["node1_lastblock"].hash) console.log("OK"); else { console.log("FAILED"); console.error(testname + "FAILED"); } callback(err, res); }