This repository was archived by the owner on Jan 9, 2026. It is now read-only.
added passage of time in the local pact server#1082
Merged
jwiegley merged 1 commit intokadena-io:masterfrom Dec 9, 2022
Merged
added passage of time in the local pact server#1082jwiegley merged 1 commit intokadena-io:masterfrom
jwiegley merged 1 commit intokadena-io:masterfrom
Conversation
jwiegley
previously approved these changes
Dec 9, 2022
| (PactError TxFailure def def . viaShow $ s) | ||
| applyCmd logger conf dbv gasModel bh bt pbh spv exConfig exMode _ (ProcSucc cmd) = do | ||
| applyCmd logger conf dbv gasModel bh _ pbh spv exConfig exMode _ (ProcSucc cmd) = do | ||
| blocktime <- (((*) 1000000) <$> systemSeconds <$> getSystemTime) |
Contributor
There was a problem hiding this comment.
Suggested change
| blocktime <- (((*) 1000000) <$> systemSeconds <$> getSystemTime) | |
| blocktime <- (*) 1_000_000 . systemSeconds <$> getSystemTime |
This needs to be paired with {-# LANGUAGE NumericUnderscores #-} up top.
I'd like to try this out on command-line first, actually
emilypi
previously approved these changes
Dec 9, 2022
Contributor
emilypi
left a comment
There was a problem hiding this comment.
Wonderful! thanks @qooboodoop
jwiegley
approved these changes
Dec 9, 2022
Contributor
jwiegley
left a comment
There was a problem hiding this comment.
Ok, ran it here and it all looks good to me. Thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current
pact -slocal server does not proceed block-time as well as block-height and prev-block-hash, but I didn't change the last two as I am not sure when a block mine is supposed to happen. This sets the block-time at the current UTC time which makes the (chain-data) a little bit more interesting than being stuck on 0 of epoch.