-
Notifications
You must be signed in to change notification settings - Fork 214
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
[ADP-3344] Add currentPParams
to NetworkLayer
.
#4819
[ADP-3344] Add currentPParams
to NetworkLayer
.
#4819
Conversation
1a4d46b
to
de99cb8
Compare
ef53212
to
0522825
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.
lgtm 👍
@@ -430,7 +429,7 @@ withNetworkLayer tr pipeliningStrategy np conn ver tol action = do | |||
|
|||
-- | Network parameters and protocol parameters for the node's current tip. | |||
data NetworkParams = NetworkParams | |||
{ protocolParams :: MaybeInRecentEra Write.PParams | |||
{ protocolParams :: Read.EraValue Read.PParams | |||
, protocolParamsLegacy :: ProtocolParameters |
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.
So now this protocolParamsLegacy
could be dropped — if we wanted to
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.
Yes. The question is whether this investment into the legacy wallet is worth the effort. At the moment, I'd like to freeze it in place, at least.
0522825
to
e759988
Compare
e759988
to
3b58287
Compare
This pull request changes the
NetworkLayer
to retrieve era-indexed protocol parameters.In particular, this pull request removes the field
currentProtocolParametersInRecentEras
fromNetworkLayer
and adds a fieldcurrentPParams
instead.This pull request also refactors the local state query for
currentProtocolParameters
to use a conversion on top ofPParams era
instead of trying to mingle conversion and query.Issue Number
ADP-3344