Improve cucumber tx reliability
@@ -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");
