-
Notifications
You must be signed in to change notification settings - Fork 160
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
Fix active_epoch_no of PoolUpdates #611
Conversation
16d113b
to
df719d0
Compare
10dac50
to
915b253
Compare
@@ -296,14 +297,23 @@ insertPoolRegister tracer network (EpochNo epoch) txId idx params = do | |||
] | |||
|
|||
poolHashId <- insertPoolHash (Shelley._poolId params) | |||
|
|||
let wasPoolRegistered = Set.member (Shelley._poolId params) $ getPoolParams $ lssOldState lStateSnap |
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 think this is big enough to be pulled out into a separate function, even if its in a where
clause.
@@ -86,6 +88,7 @@ import Ouroboros.Network.Block (HeaderHash, Point (..)) | |||
import qualified Ouroboros.Network.Point as Point | |||
|
|||
import qualified Shelley.Spec.Ledger.BaseTypes as Shelley | |||
import Shelley.Spec.Ledger.Keys |
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 imports from outside this repo should be qualified or explicit.
This makes it easier to figure out where a symbol comes from
915b253
to
e2d1afa
Compare
62c0731
to
2b8026d
Compare
Previously, the value inserted in the activeEpochNo field did not match the actual behaviour of the ledger rules. The epoch where the update becomes active is the current epoch plus two or three. * If the pool is found in `_pParams` field of `PState` before the current block its `+3` (retirements in the current block are irrelevant). * If it's not found, but there is already another `PoolReg` in the current block it's `+3` (we can check this from the db). * Otherwize its `+2`. Closes: #610
2b8026d
to
c226c4b
Compare
No description provided.