-
Notifications
You must be signed in to change notification settings - Fork 490
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
KeyManager
: Introduce GetBestHeight(SyncType)
#12212
KeyManager
: Introduce GetBestHeight(SyncType)
#12212
Conversation
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.
I see no harm in this.
I designed that way while implementing TurboSync
because my rule of thumb for living a happy life is to never touch existing behavior in the KeyManager
It's however true that the API simply makes more sense that way.
I believe that in the same PR we could remove SetBestHeights
, and apply the same change and remove SetTurboSyncHeight
in favour of SetHeight(syncType)
.
What I can imagine is to modify -public void SetBestHeight(Height height, bool toFile = true)
-public void SetBestTurboSyncHeight(Height height, bool toFile = true)
-public Height GetBestHeight() and one would be responsible to call I find that better because it forces people to think about the sync type (as it is important) |
KeyManager
: Introduce GetBestHeight(SyncType)
KeyManager
: Introduce GetBestHeight(SyncType)
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.
tACK
I think it's better as well. |
Not sure if it's a good idea or not. WDYT @turbolay?