Skip to content

Commit

Permalink
Change tests to use new default RegTest RPC port
Browse files Browse the repository at this point in the history
  • Loading branch information
msgilligan committed Jul 5, 2020
1 parent 0743299 commit fbec44c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions bitcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ txindex=1
debug=1
logtimestamps=1
omniseedblockfilter=0

[regtest]
rpcport=18443
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fbec44c

Please sign in to comment.