Skip to content

Commit

Permalink
Another hack related to RPC port change
Browse files Browse the repository at this point in the history
  • Loading branch information
msgilligan committed Mar 6, 2020
1 parent 4816132 commit a51642f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ import org.bitcoinj.params.RegTestParams
*/
class RegTestContext {
static setup(String user, String pass) {
def client = new OmniTestClient(RegTestParams.get(), RpcURI.defaultRegTestURI, user, pass)
// If Bitcoin Core 0.16.0 or greater, rpc port for RegTest has changed. ConsensusJ 0.5.0
// reflects this change, but Travis tests are still testing an old Omni Core.
// Previously Bitcoin Core (and Omni Core) used the same port as TESTNET for REGTEST
// This recentBitcoinCore hack allows those tests to pass until we update `travis.yml`
// and any other test configuration/infrastructure, etc.
def recentBitcoinCore = false;
URI regTestRpcUri = recentBitcoinCore ? RpcURI.defaultRegTestURI : RpcURI.defaultTestNetURI
def client = new OmniTestClient(RegTestParams.get(), regTestRpcUri, user, pass)
def env = new RegTestEnvironment(client)
def funder = new RegTestOmniFundingSource(client)
return [client, env, funder]
Expand Down

0 comments on commit a51642f

Please sign in to comment.