<p></p>
<p><b>@ghubstan</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/bisq-network/bisq/pull/4366#discussion_r456588807">apitest/src/main/java/bisq/apitest/method/GetBalanceTest.java</a>:</p>
<pre style='color:#555'>> + // Have to generate 1 regtest block for alice's wallet to show 10 BTC balance.
+ bitcoinCli.generateBlocks(1);
+
+ // Give the alicedaemon time to parse the new block.
+ MILLISECONDS.sleep(1500);
+ } catch (InterruptedException ex) {
+ fail(ex.getMessage());
+ }
+ }
+
+ @Test
+ @Order(1)
+ public void testGetBalance() {
+ var balance = grpcStubs.walletsService.getBalance(GetBalanceRequest.newBuilder().build()).getBalance();
+ assertEquals(1000000000, balance);
+ }
</pre>
<p>It is an important part of the <code>dao-setup</code> for regtest/dev mode testing. Bob & Alice are given a initial BTC & BSQ balances and dummy payment accounts so they can trade without coders / testers having to go through the motions of funding wallets from <code>bitcoin-cli -regest</code>, setting up payment account, etc. Having to do that would make release testing even more time consuming that it already is.</p>
<p>There are more details <a href="https://github.com/bisq-network/bisq/blob/master/docs/dao-setup.md">here</a>.</p>
<p>Eventually, we want to be able to test creating the DAO setup environment, but I don't think that's in scope for quite awhile.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4366#discussion_r456588807">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNRJE3HBQ6FGUA7I3ATR4CFWNANCNFSM4OV5LEEQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXWSXQ57AYT6C2VKPLR4CFWNA5CNFSM4OV5LEE2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODLPWZCY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4366#discussion_r456588807",
"url": "https://github.com/bisq-network/bisq/pull/4366#discussion_r456588807",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>