Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
4146: Minor minor cleanups r=erikd a=erikd



Co-authored-by: Erik de Castro Lopo <[email protected]>
  • Loading branch information
iohk-bors[bot] and erikd committed May 24, 2019
2 parents 59afcfc + 6b15a74 commit 4a9f026
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chain/src/Pos/Chain/Ssc/Error/Verify.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ instance Buildable SscVerifyError where
build (NotSharesPhase slotId) =
bprint (build%" doesn't belong share phase") slotId
build (NotIntermediatePhase slotId) =
bprint (build%" doesn't belong intermidiate phase") slotId
bprint (build%" doesn't belong intermediate phase") slotId
build CurrentSlotUnknown = "we don't know current slot"

build (DifferentEpoches e g) =
Expand Down
4 changes: 2 additions & 2 deletions chain/src/Pos/Chain/Update/Poll/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ instance (MonadPollRead m) =>
case bvs of
Nothing ->
logWarning $ "setAdoptedBV: unknown version " <> pretty bv -- can't happen actually
Just (bvsModifier -> bvm) ->
pmAdoptedBVFullL .= Just (bv, applyBVM bvm adoptedBVD)
Just bvm ->
pmAdoptedBVFullL .= Just (bv, applyBVM (bvsModifier bvm) adoptedBVD)
setLastConfirmedSV SoftwareVersion {..} = ether $
pmConfirmedL %= MM.insert svAppName svNumber
delConfirmedSV appName = ether $
Expand Down
4 changes: 2 additions & 2 deletions db/src/Pos/DB/Update/Poll/Logic/Softfork.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ processGenesisBlock genesisConfig epoch = do
-- resolution rule check.
totalStake <- note (PollUnknownStakes epoch)
=<< getEpochTotalStake (configBlockVersionData genesisConfig) epoch
BlockVersionData {..} <- getAdoptedBVData
sfr <- bvdSoftforkRule <$> getAdoptedBVData
-- Then we take all competing BlockVersions and actually check softfork
-- resolution rule for them.
competing <- getCompetingBVStates
logCompetingBVStates competing
let checkThreshold' = checkThreshold totalStake bvdSoftforkRule
let checkThreshold' = checkThreshold totalStake sfr
toAdoptList <- catMaybes <$> mapM checkThreshold' competing
logWhichCanBeAdopted $ map fst toAdoptList
-- We also do sanity check in assert mode just in case.
Expand Down

0 comments on commit 4a9f026

Please sign in to comment.