Skip to content

Commit

Permalink
tests: fix broken cucumber tests (#3058)
Browse files Browse the repository at this point in the history
  • Loading branch information
stringhandler committed Jul 6, 2021
2 parents 6b6842f + 87c2ad4 commit 868a064
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions integration_tests/helpers/baseNodeClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 868a064

Please sign in to comment.