Add chain heights to logs

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2023-01-05 10:22:50 -05:00 committed by Alejandro García
parent 6f803560cd
commit 8fd8586923
No known key found for this signature in database
GPG Key ID: F806F422E222AA02
2 changed files with 11 additions and 4 deletions

View File

@ -76,8 +76,12 @@ public class BuyerVerifiesFinalDelayedPayoutTx extends TradeTask {
if (!buyersDelayedPayoutTx.getTxId().equals(finalDelayedPayoutTx.getTxId())) {
String errorMsg = "TxIds of buyersDelayedPayoutTx and finalDelayedPayoutTx must be the same.";
log.error("{} \nbuyersDelayedPayoutTx={}, \nfinalDelayedPayoutTx={}",
errorMsg, buyersDelayedPayoutTx, finalDelayedPayoutTx);
log.error("{} \nbuyersDelayedPayoutTx={}, \nfinalDelayedPayoutTx={}, " +
"\nBtcWalletService.chainHeight={}, \nDaoState.chainHeight={}",
errorMsg, buyersDelayedPayoutTx, finalDelayedPayoutTx,
processModel.getBtcWalletService().getBestChainHeight(),
processModel.getDaoFacade().getChainHeight());
throw new IllegalArgumentException(errorMsg);
}
}

View File

@ -67,8 +67,11 @@ public class BuyerVerifiesPreparedDelayedPayoutTx extends TradeTask {
lockTime);
if (!buyersPreparedDelayedPayoutTx.getTxId().equals(sellersPreparedDelayedPayoutTx.getTxId())) {
String errorMsg = "TxIds of buyersPreparedDelayedPayoutTx and sellersPreparedDelayedPayoutTx must be the same.";
log.error("{} \nbuyersPreparedDelayedPayoutTx={}, \nsellersPreparedDelayedPayoutTx={}",
errorMsg, buyersPreparedDelayedPayoutTx, sellersPreparedDelayedPayoutTx);
log.error("{} \nbuyersPreparedDelayedPayoutTx={}, \nsellersPreparedDelayedPayoutTx={}, " +
"\nBtcWalletService.chainHeight={}, \nDaoState.chainHeight={}",
errorMsg, buyersPreparedDelayedPayoutTx, sellersPreparedDelayedPayoutTx,
processModel.getBtcWalletService().getBestChainHeight(),
processModel.getDaoFacade().getChainHeight());
throw new IllegalArgumentException(errorMsg);
}
}