-
Notifications
You must be signed in to change notification settings - Fork 969
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
Remove expired upgrades #2272
Remove expired upgrades #2272
Conversation
src/herder/test/UpgradesTests.cpp
Outdated
@@ -1831,3 +1831,58 @@ TEST_CASE("upgrade invalid during ledger close", "[upgrades]") | |||
REQUIRE_THROWS(executeUpgrade(*app, makeTxCountUpgrade(0))); | |||
REQUIRE_THROWS(executeUpgrade(*app, makeBaseReserveUpgrade(0))); | |||
} | |||
|
|||
void |
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.
static or use empty namespace for helper function
src/herder/test/UpgradesTests.cpp
Outdated
} | ||
} | ||
|
||
TEST_CASE("remove expired upgrades", "[upgrades]") |
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.
We prefer to use sections in this case: not because the setup is expensive but to avoid creating too many ultra small tests (when we run parallel tests, we split using test cases).
Note that using a section also allows (if you want) to move the helper function inside the test case (as a lambda), as to scope it better.
looks good. squash and rebase and we'll merge when we open master for 12.1.0 |
590603d
to
d5c6d12
Compare
d5c6d12
to
b1ff396
Compare
@sisuresh : |
r+ b1ff396 |
Remove expired upgrades Reviewed-by: MonsieurNicolas
Description
Resolves #1661
This change removes pending upgrades if the current ledger close time has gone past the upgrade time by 12 hours.
Checklist
clang-format
v5.0.0 (viamake format
or the Visual Studio extension)