Skip to content

Commit

Permalink
test: fix cucumber metadata signature (#3665)
Browse files Browse the repository at this point in the history
Description
---
Fix the metadata signature error in cucumber tests.

How Has This Been Tested?
---
I did run one test that was failing (now passes).
  • Loading branch information
Cifko committed Dec 17, 2021
1 parent 4da15fc commit 869273e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions integration_tests/helpers/transactionBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class TransactionBuilder {
let features_buffer = Buffer.concat([
flags,
toLittleEndian(parseInt(features.maturity), 64),
toLittleEndian(features.metadata.length, 64),
new Uint8Array(features.metadata),
new Uint8Array([0, 0, 0, 0, 0]),
]);
blake2bUpdate(context, buff_nonce);
blake2bUpdate(context, script);
Expand Down Expand Up @@ -166,6 +169,13 @@ class TransactionBuilder {
const outputFeatures = {
flags: 0,
maturity: 0,
metadata: [],
// In case any of these change, update the buildMetaChallenge function
unique_id: null,
parent_public_key: null,
asset: null,
mint_non_fungible: null,
sidechain_checkpoint: null,
};
let key = Math.floor(Math.random() * 500000000000 + 1);
let privateKey = Buffer.from(toLittleEndian(key, 256)).toString("hex");
Expand Down Expand Up @@ -340,6 +350,13 @@ class TransactionBuilder {
let outputFeatures = {
flags: 1,
maturity: lockHeight,
metadata: [],
// In case any of these change, update the buildMetaChallenge function
unique_id: null,
parent_public_key: null,
asset: null,
mint_non_fungible: null,
sidechain_checkpoint: null,
};
let scriptOffsetPrivateKeyNum = Math.floor(
Math.random() * 500000000000 + 1
Expand Down

0 comments on commit 869273e

Please sign in to comment.