Skip to content

Commit ac419b8

Browse files
author
Park Juhyung
committed
Make runChains be able to run with pre-existing DB
Removing pending transactions helps to run chains with a reliable state
1 parent 7a1d6fb commit ac419b8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ibc.ts/src/scenario/runChains.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ async function checkChainAAndBAreRunning() {
9191
debug("Send ping to B");
9292
await sdkB.rpc.node.ping();
9393

94+
debug("Delete pending Txs in A");
95+
await sdkA.rpc.sendRpcRequest("mempool_deleteAllPendingTransactions", []);
96+
debug("Delete pending Txs in B");
97+
await sdkB.rpc.sendRpcRequest("mempool_deleteAllPendingTransactions", []);
98+
9499
await sendPayTx({
95100
sdk: sdkA,
96101
from: "accqym7qmn5yj29cdl405xlmx6awd3f3yz07g7vq2c9",
@@ -121,7 +126,7 @@ async function sendPayTx({
121126
account: from,
122127
passphrase: "",
123128
fee: 1000,
124-
seq: 0
129+
seq: await sdk.rpc.chain.getSeq(from)
125130
});
126131
debug(`Send payTx to ${chainName}`);
127132
const txhash = await sdk.rpc.chain.sendSignedTransaction(signedPay);

0 commit comments

Comments
 (0)