[bisq-network/bisq] Add irregular txType, add check for total balance, prevent proposal withhold attack (#2587)
Manfred Karrer
notifications at github.com
Sat Mar 30 03:38:37 UTC 2019
ManfredKarrer commented on this pull request.
> @@ -219,12 +222,14 @@ private void publishToAppendOnlyDataStore() {
.filter(proposal -> validatorProvider.getValidator(proposal).isValidAndConfirmed(proposal))
.map(ProposalPayload::new)
.forEach(proposalPayload -> {
- boolean success = p2PService.addPersistableNetworkPayload(proposalPayload, true);
- if (success)
- log.info("We published a ProposalPayload to the P2P network as append-only data. proposalTxId={}",
- proposalPayload.getProposal().getTxId());
- else
- log.warn("publishToAppendOnlyDataStore failed for proposal " + proposalPayload.getProposal());
+ UserThread.runAfterRandomDelay(() -> {
+ boolean success = p2PService.addPersistableNetworkPayload(proposalPayload, true);
+ if (success)
+ log.info("We published a ProposalPayload to the P2P network as append-only data. proposalTxId={}",
+ proposalPayload.getProposal().getTxId());
+ else
+ log.warn("publishToAppendOnlyDataStore failed for proposal " + proposalPayload.getProposal());
+ }, 100, 5000, TimeUnit.MILLISECONDS);
We don't want to risk that the user shuts down the app in the meantime. The long we delay the higher the risk.
--
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/2587#discussion_r270611812
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190329/66d3f2b6/attachment-0001.html>
More information about the bisq-github
mailing list