Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[CBR-345] clean formatting of slots/epoch indexes #3633

Merged
merged 1 commit into from
Sep 26, 2018

Conversation

CodiePP
Copy link
Contributor

@CodiePP CodiePP commented Sep 19, 2018

Description

clean formatting of slots/epoch indexes as proposed by @cleverca22
reason: there were more occurences of wrong formatting in the logs.
moved the formatting code 'intords' from core to util
reason: the formatting should be available in all modules

Linked issue

CBR-345

Type of change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • [~] 🔨 New or improved tests for existing code
  • ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • [~] If my code deals with exceptions, it follows the guidelines.
  • [~] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
  • [~] CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

  • [~] I have added tests to cover my changes.
  • All new and existing tests passed.

QA Steps

verifiable in logs from benchmarking, or "block sync" test

-- | temporary reimplementation of 'ords' from "Formatting"
-- because the original function converts the integer value to a real number
intords :: (Show n, Integral n) => F.Format r (n -> r)
intords = F.later go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this been submitted upstream? Even as a but report?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, by Michael Bishop.
we have implemented this locally in 'core', but there were more instances of wrong formatting in other places. This is why it is moved to 'util'.
The problem is that grepping the logs for something like '4th epoch' will not hit the (wrongly formatted) entry '4.0th epoch'.

@CodiePP CodiePP requested a review from cleverca22 September 24, 2018 07:15
@CodiePP CodiePP force-pushed the adiemand/CBR-345/clean_formatting_slots_and_epochs branch from 8226563 to a16b395 Compare September 24, 2018 07:25
@CodiePP
Copy link
Contributor Author

CodiePP commented Sep 24, 2018

rebased on develop

@CodiePP CodiePP force-pushed the adiemand/CBR-345/clean_formatting_slots_and_epochs branch from a16b395 to 5fb5e4f Compare September 24, 2018 12:00
@CodiePP CodiePP force-pushed the adiemand/CBR-345/clean_formatting_slots_and_epochs branch from 5fb5e4f to 0f08ccc Compare September 26, 2018 11:31
Signed-off-by: Alexander Diemand <codieplusplus@apax.net>
@CodiePP CodiePP force-pushed the adiemand/CBR-345/clean_formatting_slots_and_epochs branch from 0f08ccc to cb0bb90 Compare September 26, 2018 18:21
@CodiePP CodiePP merged commit d901dbf into develop Sep 26, 2018
@CodiePP CodiePP deleted the adiemand/CBR-345/clean_formatting_slots_and_epochs branch September 26, 2018 20:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants