Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbose logging for issue 229 #232

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
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