diff --git a/omnij-rpc/src/main/groovy/foundation/omni/test/RegTestContext.groovy b/omnij-rpc/src/main/groovy/foundation/omni/test/RegTestContext.groovy index 1b74bcc4..591c4791 100644 --- a/omnij-rpc/src/main/groovy/foundation/omni/test/RegTestContext.groovy +++ b/omnij-rpc/src/main/groovy/foundation/omni/test/RegTestContext.groovy @@ -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]