From fbec44cdb20fde8b19131ebb357baef1ef44b3f3 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Wed, 1 Jul 2020 14:19:04 -0700 Subject: [PATCH] Change tests to use new default RegTest RPC port --- bitcoin.conf | 3 +++ .../src/integ/groovy/foundation/omni/BaseRegTestSpec.groovy | 4 ++-- .../main/groovy/foundation/omni/test/RegTestContext.groovy | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bitcoin.conf b/bitcoin.conf index b107f764..edf0ca4d 100644 --- a/bitcoin.conf +++ b/bitcoin.conf @@ -6,3 +6,6 @@ txindex=1 debug=1 logtimestamps=1 omniseedblockfilter=0 + +[regtest] +rpcport=18443 diff --git a/omnij-rpc/src/integ/groovy/foundation/omni/BaseRegTestSpec.groovy b/omnij-rpc/src/integ/groovy/foundation/omni/BaseRegTestSpec.groovy index 702e8ca6..79623fdf 100644 --- a/omnij-rpc/src/integ/groovy/foundation/omni/BaseRegTestSpec.groovy +++ b/omnij-rpc/src/integ/groovy/foundation/omni/BaseRegTestSpec.groovy @@ -26,11 +26,11 @@ abstract class BaseRegTestSpec extends Specification implements OmniTestClientDe { // 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. + // reflects this change, but some 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; + boolean recentBitcoinCore = true; URI regTestRpcUri = recentBitcoinCore ? RpcURI.defaultRegTestURI : RpcURI.defaultTestNetURI client = new OmniTestClient(RegTestParams.get(), regTestRpcUri, rpcTestUser, rpcTestPassword) fundingSource = new RegTestFundingSource(client) 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 82db2d4f..ae0ec719 100644 --- a/omnij-rpc/src/main/groovy/foundation/omni/test/RegTestContext.groovy +++ b/omnij-rpc/src/main/groovy/foundation/omni/test/RegTestContext.groovy @@ -11,11 +11,11 @@ import org.bitcoinj.params.RegTestParams class RegTestContext { static setup(String user, String 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. + // reflects this change, but some 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; + def recentBitcoinCore = true; URI regTestRpcUri = recentBitcoinCore ? RpcURI.defaultRegTestURI : RpcURI.defaultTestNetURI def client = new OmniTestClient(RegTestParams.get(), regTestRpcUri, user, pass) def env = new RegTestEnvironment(client)