-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: increased withdrawal limits to flat 2000 from v22 #6369
Conversation
clang format: --- src/evo/creditpool.cpp (before formatting)
+++ src/evo/creditpool.cpp (after formatting)
@@ -187,10 +187,11 @@
assert(currentLimit >= 0);
if (currentLimit > 0 || latelyUnlocked > 0 || locked > 0) {
- LogPrint(BCLog::CREDITPOOL, "CCreditPoolManager: asset unlock limits on height: %d locked: %d.%08d limit: %d.%08d unlocked-in-window: %d.%08d\n",
- block_index->nHeight, locked / COIN, locked % COIN,
- currentLimit / COIN, currentLimit % COIN,
- latelyUnlocked / COIN, latelyUnlocked % COIN);
+ LogPrint(BCLog::CREDITPOOL, /* Continued */
+ "CCreditPoolManager: asset unlock limits on height: %d locked: %d.%08d limit: %d.%08d "
+ "unlocked-in-window: %d.%08d\n",
+ block_index->nHeight, locked / COIN, locked % COIN, currentLimit / COIN, currentLimit % COIN,
+ latelyUnlocked / COIN, latelyUnlocked % COIN);
}
CCreditPool pool{locked, currentLimit, latelyUnlocked, indexes}; |
src/evo/creditpool.cpp
Outdated
block_index->nHeight, locked / COIN, locked % COIN, | ||
currentLimit / COIN, currentLimit % COIN, | ||
latelyUnlocked / COIN, latelyUnlocked % COIN); | ||
LogPrint(BCLog::CREDITPOOL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All calls to LogPrintf() and LogPrint() should be terminated with \n
src/evo/creditpool.cpp: LogPrint(BCLog::CREDITPOOL,
LogPrint(BCLog::CREDITPOOL, | |
LogPrint(BCLog::CREDITPOOL, /* Continued */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we disable clang-format explicitely for LogPrint
somehow?
a30c094
to
a51ade5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK a51ade5
Small optimizations are coming.... |
325b8a9
to
c97f5f5
Compare
It is impossible situation which will never happen. But better to change it to exception for better error-prune implementation in case someone will decide to change this code: const auto quorums = qman.ScanQuorums(llmqType, pindexTip, quorums_to_scan); if (bool isActive = std::any_of(quorums.begin(), quorums.end(), [&](const auto &q) { return q->qc->quorumHash == quorumHash; }); !isActive) { return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-assetunlock-too-old-quorum"); } ... const auto quorum = qman.GetQuorum(llmqType, quorumHash); assert(quorum); <-- for sure exist because we just scanned quorums
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK e43ca62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK e43ca62
Guix builds locally; gonna merge |
Issue being fixed or feature implemented
Limit 1000 seems a bit small at the moment, while limit 2000 is still safe enough.
What was done?
Withdrawals limits in pre-v22 are:
The fork
withdrawals
introduces higher limit:How Has This Been Tested?
Updated functional test
feature_asset_locks.py
Breaking Changes
Limits of withdrawals are increased to 2000 dash. It changes consensus rules.
Checklist: