From 87c2ad4abd081de5c96c0e8810ab5f51c323d5bd Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Tue, 6 Jul 2021 11:32:57 +0200 Subject: [PATCH] fix broken cucumber tests --- integration_tests/helpers/baseNodeClient.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/integration_tests/helpers/baseNodeClient.js b/integration_tests/helpers/baseNodeClient.js index fd7b115a4f..f686a7e373 100644 --- a/integration_tests/helpers/baseNodeClient.js +++ b/integration_tests/helpers/baseNodeClient.js @@ -6,6 +6,7 @@ const TransactionBuilder = require("./transactionBuilder"); const { SHA3 } = require("sha3"); const { toLittleEndian } = require("./util"); const cloneDeep = require("clone-deep"); +const PowAlgo = { MONERO: 0, SHA3: 1 }; class BaseNodeClient { constructor(clientOrPort) { @@ -89,7 +90,7 @@ class BaseNodeClient { getBlockTemplate(weight) { return this.client .getNewBlockTemplate() - .sendMessage({ algo: { pow_algo: 2 }, max_weight: weight }) + .sendMessage({ algo: { pow_algo: PowAlgo.SHA3 }, max_weight: weight }) .then((template) => { const res = { minerData: template.miner_data, @@ -202,9 +203,10 @@ class BaseNodeClient { .sendMessage({}) .then((tip) => { currHeight = parseInt(tip.metadata.height_of_longest_chain); - return this.client - .getNewBlockTemplate() - .sendMessage({ algo: { pow_algo: 2 }, max_weight: weight }); + return this.client.getNewBlockTemplate().sendMessage({ + algo: { pow_algo: PowAlgo.SHA3 }, + max_weight: weight, + }); }) .then((template) => { block = template.new_block_template;