[bisq-network/bisq] Verify maker & taker fee transactions via Mempool lookup (#5160)
jmacxx
notifications at github.com
Wed Mar 17 14:31:30 CET 2021
@jmacxx commented on this pull request.
> @@ -152,6 +156,20 @@ private void checkPriceThreshold(MarketPrice marketPrice, OpenOffer openOffer) {
openOfferManager.deactivateOpenOffer(openOffer, () -> {
}, errorMessage -> {
});
+ } else if (openOffer.getState() == OpenOffer.State.AVAILABLE) {
+ // check the mempool if it has not been done before
+ if (openOffer.getMempoolStatus() < 0 && mempoolService.canRequestBeMade()) {
+ mempoolService.validateOfferMakerTx(openOffer.getOffer().getOfferPayload(), (txValidator -> {
+ openOffer.setMempoolStatus(txValidator.isFail() ? 0 : 1);
Yes exactly. Cleaner than duplicating the deactivation code within the async response.
One thing I'd like to do though is delay 60 seconds before checking a new offer, because at the moment it checks immediately upon creation which can be too soon for the tx to have propagated.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5160#discussion_r596019211
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210317/195626a4/attachment.htm>
More information about the bisq-github
mailing list