-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 redundant checkAccept call #351
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,7 +245,6 @@ class LedgerMasterImp | |
else | ||
{ | ||
mLedgerHistory.builtLedger (newLCL); | ||
checkAccept (newLCL); | ||
} | ||
} | ||
|
||
|
@@ -770,6 +769,10 @@ class LedgerMasterImp | |
// Because we just built a ledger, we are no longer building one | ||
setBuildingLedger (0); | ||
|
||
// No need to process validations in standalone mode | ||
if (getConfig().RUN_STANDALONE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And a comment here, perhaps, telling us why we can exit early? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can do that, but it really should be obvious. There are no validations in standalone mode. Who would you send them to? Who would you receive them from? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just say "There are no validations in standalone mode" - it wasn't totally On Wed, May 7, 2014 at 5:17 PM, JoelKatz notifications@github.com wrote:
|
||
return; | ||
|
||
if (ledger->getLedgerSeq() <= mValidLedgerSeq) | ||
{ | ||
WriteLog (lsINFO, LedgerConsensus) | ||
|
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.
Just for my curiosity, why is this redundant? It isn't obvious, even reading the whole file...
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.
The new validation timing code is very smart about precisely when the last fully-validated ledger can be advanced. The call is here:
https://github.com/ripple/rippled/blob/check-accept/src/ripple_app/ledger/LedgerMaster.cpp#L784