Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ public List<Map<String, Object>> omniGetActiveDExSells() throws JsonRpcException
*/
public BalanceEntry omniGetBalance(Address address, CurrencyID currency)
throws JsonRpcException, IOException {
return send("omni_getbalance", BalanceEntry.class, address, currency.getValue());
var result = send("omni_getbalance", BalanceEntry.class, address, currency.getValue());
log.info("omni_getbalance result for {}, {}: {}", address, currency, result);
return result;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,24 @@ class SendToOwnersTestPlanSpec extends BaseRegTestSpec {
def startMSC = OmniDivisibleValue.of(mscAvailable + mscReserved)
def actorAddress = createFundedAddress(startBTC, startMSC, false)
def currencyMSC = CurrencyID.of(ecosystem.value())

assertBalance(actorAddress, currencyMSC, startMSC, 0.divisible)

def currencySPT = getStoProperty(actorAddress, data)

if (currencySPT != CurrencyID.OMNI && currencySPT != CurrencyID.TOMNI) {
assertBalance(actorAddress, currencyMSC, startMSC, 0.divisible)
}

// Create a DEx offer to reserve an amount
if (mscReserved > 0) {
reserveAmountMSC(actorAddress, currencyMSC, mscReserved.divisible)
}

if (currencySPT != CurrencyID.OMNI && currencySPT != CurrencyID.TOMNI) {
assertBalance(actorAddress, currencyMSC, mscAvailable, mscReserved)
}

when: "the owners are funded"
def ownerIds = 0..<numberOfOwners
def owners = ownerIds.stream()
Expand Down
4 changes: 4 additions & 0 deletions omnij-rpc/src/integ/logging.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ org.consensusj.jsonrpc.level=WARNING
# Set bitcoinj log level to WARNING to avoid "Creating bitcoinj 0.14.3 context" INFO message
org.bitcoinj.core.level=WARNING

foundation.omni.rpc=FINEST

foundation.omni.test=FINEST
foundation.omni.test.rpc.sto=FINEST
2 changes: 1 addition & 1 deletion test-omni-integ-regtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ BTCPID=$!

# Run integration tests
echo "Running Omni RPC integration tests in RegTest mode..."
./gradlew clean regTest --scan --stacktrace
./gradlew clean omnij-rpc:activationRegTest omnij-rpc:regTest --tests '*SendToOwnersTestPlan*' --scan --stacktrace
GRADLESTATUS=$?

exit $GRADLESTATUS