[bisq-network/bisq] Provide ASIC resistant PoW scheme for BSQ swaps (PR #5858)
Steven Barclay
notifications at github.com
Sat Dec 4 07:43:26 CET 2021
@stejbac commented on this pull request.
> @@ -493,13 +494,23 @@ public boolean isProofOfWorkValid(Offer offer) {
}
checkArgument(offer.getBsqSwapOfferPayload().isPresent(),
"Offer payload must be BsqSwapOfferPayload");
- return HashCashService.verify(offer.getBsqSwapOfferPayload().get().getProofOfWork(),
- HashCashService.getBytes(offer.getId() + offer.getOwnerNodeAddress().toString()),
+ ProofOfWork pow = offer.getBsqSwapOfferPayload().get().getProofOfWork();
+ var service = ProofOfWorkService.forVersion(pow.getVersion());
+ if (!service.isPresent() || !getEnabledPowVersions().contains(pow.getVersion())) {
+ return false;
+ }
+ return service.get().verify(offer.getBsqSwapOfferPayload().get().getProofOfWork(),
Yes, sorry I missed that.
--
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/5858#discussion_r762393945
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20211203/db43d397/attachment.htm>
More information about the bisq-github
mailing list