Skip to content

Commit

Permalink
Hack to fix Travis Omni Core RegTest
Browse files Browse the repository at this point in the history
Our Travis tests are still testing an old Omni Core. Since consensusj 0.5.0
updated the default port for RegTest RPC, we need to this workaround
until we make other changes.
  • Loading branch information
msgilligan committed Mar 6, 2020
1 parent 3d9399c commit 4816132
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ abstract class BaseRegTestSpec extends Specification implements OmniTestClientDe
static final protected String rpcTestPassword = testServers.rpcTestPassword;

{
client = new OmniTestClient(RegTestParams.get(), RpcURI.defaultRegTestURI, rpcTestUser, rpcTestPassword)
// 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.
boolean recentBitcoinCore = false;
URI regTestRpcUri = recentBitcoinCore ? RpcURI.defaultRegTestURI : RpcURI.defaultTestNetURI
client = new OmniTestClient(RegTestParams.get(), regTestRpcUri, rpcTestUser, rpcTestPassword)
fundingSource = new RegTestFundingSource(client)
}

Expand Down

0 comments on commit 4816132

Please sign in to comment.