We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 247b75a commit 7457184Copy full SHA for 7457184
1 file changed
packages/cashscript/src/network/MockNetworkProvider.ts
@@ -45,6 +45,11 @@ export default class MockNetworkProvider implements NetworkProvider {
45
const transactionBin = hexToBin(txHex);
46
47
const txid = binToHex(sha256(sha256(transactionBin)).reverse());
48
+
49
+ if (this.transactionMap[txid]) {
50
+ throw new Error(`Transaction with txid ${txid} was already submitted: txn-mempool-conflict`);
51
+ }
52
53
this.transactionMap[txid] = txHex;
54
55
const decoded = decodeTransaction(transactionBin);
0 commit comments