log cleanup

This commit is contained in:
woodser 2024-05-03 14:58:31 -04:00
parent f53a4e5fad
commit b50238a805
2 changed files with 5 additions and 2 deletions

View File

@ -1027,7 +1027,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
// handle sufficient available balance to split output
boolean sufficientAvailableBalance = xmrWalletService.getAvailableBalance().compareTo(offerReserveAmount) >= 0;
if (sufficientAvailableBalance) {
log.info("Splitting and scheduling outputs for offer {} at subaddress {}", openOffer.getShortId());
log.info("Splitting and scheduling outputs for offer {}", openOffer.getShortId());
splitAndSchedule(openOffer);
} else if (openOffer.getScheduledTxHashes() == null) {
scheduleWithEarliestTxs(openOffers, openOffer);
@ -1040,10 +1040,10 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
MoneroTxWallet splitOutputTx = null;
synchronized (XmrWalletService.WALLET_LOCK) {
XmrAddressEntry entry = xmrWalletService.getOrCreateAddressEntry(openOffer.getId(), XmrAddressEntry.Context.OFFER_FUNDING);
log.info("Creating split output tx to fund offer {} at subaddress {}", openOffer.getShortId(), entry.getSubaddressIndex());
long startTime = System.currentTimeMillis();
for (int i = 0; i < TradeProtocol.MAX_ATTEMPTS; i++) {
try {
log.info("Creating split output tx to fund offer {} at subaddress {}", openOffer.getShortId(), entry.getSubaddressIndex());
splitOutputTx = xmrWalletService.createTx(new MoneroTxConfig()
.setAccountIndex(0)
.setAddress(entry.getAddressString())

View File

@ -261,11 +261,14 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
// create tx
if (amount.compareTo(BigInteger.ZERO) <= 0) throw new RuntimeException(Res.get("portfolio.pending.step5_buyer.amountTooLow"));
log.info("Creating withdraw tx");
long startTime = System.currentTimeMillis();
MoneroTxWallet tx = xmrWalletService.createTx(new MoneroTxConfig()
.setAccountIndex(0)
.setAmount(amount)
.setAddress(withdrawToAddress)
.setSubtractFeeFrom(feeExcluded ? null : Arrays.asList(0)));
log.info("Done creating withdraw tx in {} ms", System.currentTimeMillis() - startTime);
// create confirmation message
BigInteger receiverAmount = tx.getOutgoingTransfer().getDestinations().get(0).getAmount();