From ab7a431abc13b4253a6244310b2da702dee1496d Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Thu, 29 Jul 2021 16:38:47 +0200 Subject: [PATCH] Improve cucumber tx reliability --- integration_tests/helpers/transactionBuilder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integration_tests/helpers/transactionBuilder.js b/integration_tests/helpers/transactionBuilder.js index 3e6f97f2df..fa8614daef 100644 --- a/integration_tests/helpers/transactionBuilder.js +++ b/integration_tests/helpers/transactionBuilder.js @@ -169,7 +169,7 @@ class TransactionBuilder { }; let key = Math.floor(Math.random() * 500 + 1); let privateKey = Buffer.from(toLittleEndian(key, 256)).toString("hex"); - let scriptKey = Math.floor(Math.random() * 500 + 1); + let scriptKey = Math.floor(Math.random() * 500000000000 + 1); let scriptPrivateKey = Buffer.from(toLittleEndian(scriptKey, 256)).toString( "hex" ); @@ -339,7 +339,9 @@ class TransactionBuilder { flags: 1, maturity: lockHeight, }; - let scriptOffsetPrivateKeyNum = Math.floor(Math.random() * 500 + 1); + let scriptOffsetPrivateKeyNum = Math.floor( + Math.random() * 500000000000 + 1 + ); let scriptOffsetPrivateKey = Buffer.from( toLittleEndian(scriptOffsetPrivateKeyNum, 256) ).toString("hex");