[bisq-network/bisq] Add irregular txType, add check for total balance, prevent proposal withhold attack (#2587)
sqrrm
notifications at github.com
Fri Mar 29 22:25:24 UTC 2019
sqrrm approved this pull request.
utACK
Perhaps a longer delay might be better, this is still quite a burst, why not spread it over half an hour? BREAK1 is 149 blocks long. Either way is fine though.
> @@ -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);
```suggestion
}, 1, 1800, TimeUnit.SECONDS);
```
--
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#pullrequestreview-220778673
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190329/b5cbc850/attachment.html>
More information about the bisq-github
mailing list