Skip to content

Commit

Permalink
fix: correct main path for wallet rpc client
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Mar 21, 2022
1 parent 4c26862 commit ec835bc
Show file tree
Hide file tree
Showing 3 changed files with 22,010 additions and 19 deletions.
8 changes: 7 additions & 1 deletion applications/daily_tests/washing_machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ function WashingMachine(options) {
this.wallet2 = new WalletClient();
debug(`Connecting to wallet2 at ${wallet2Grpc}...`);
await this.wallet2.connect(wallet2Grpc);
debug(`Connected.`);
} else {
debug("Compiling wallet2...");
const port = await getFreePort(20000, 25000);
Expand Down Expand Up @@ -287,6 +288,7 @@ async function sendFunds(senderWallet, receiverWallet, options) {
if (transactions.length > 1) {
let leftToSplit = transactions.length;
while (leftToSplit > 499) {
await waitForBalance(senderWallet, avgAmountPerTransaction * 499);
let split_result = await senderWallet.coin_split({
amount_per_split: avgAmountPerTransaction,
split_count: 499,
Expand Down Expand Up @@ -388,7 +390,11 @@ async function waitForBalance(client, balance) {
}
await sleep(1000);
if (i >= 60) {
debug(`Still waiting... [t=${r * i}s]`);
debug(
`Still waiting... [t=${r * i}s, balance=${
newBalance.available_balance
}, pending=${newBalance.pending_incoming_balance}]`
);
i = 0;
r++;
} else {
Expand Down
Loading

0 comments on commit ec835bc

Please sign in to comment.