Skip to content

Conversation

@intricate
Copy link
Contributor

@intricate intricate commented Feb 24, 2020

@intricate intricate self-assigned this Feb 24, 2020
@intricate intricate requested a review from mrBliss February 25, 2020 02:15
@intricate intricate marked this pull request as ready for review February 25, 2020 02:15
@mrBliss mrBliss added the consensus issues related to ouroboros-consensus label Feb 25, 2020
data TraceTxSubmissionOutbound txid tx = TraceTxSubmissionOutbound --TODO
data TraceTxSubmissionOutbound txid tx
= TraceTxSubmissionOutboundRecvMsgRequestTxs
![txid]
Copy link
Contributor

Choose a reason for hiding this comment

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

A bang on a list doesn't help that much: just the head of the list is forced to WHNF, not the tail. To be sure the list is forced, you could use forceElemsToWHNF, but I would not bother with that. I'd just leave out the bangs, they give a false impression of what's going on.

It would be more important if the txids are computed lazily, e.g., map txId txs, but that's not the case.

Copy link
Contributor Author

@intricate intricate Feb 25, 2020

Choose a reason for hiding this comment

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

I suppose I've gotten myself into the habit of forcing all fields to WHNF. Of course, as you mentioned, this does not guarantee that the elements of a container are in WHNF, but I've found that it's generally not a bad idea to ensure strictness at the field-level unless laziness would be particularly useful. We also do the same thing for fields of TraceEventMempool.

However, I'm not particularly committed to this idea unless it actually helps to force to WHNF, so I'll remove the bangs and push.

@intricate intricate force-pushed the intricate/txsubout-trace branch from 17dd08b to f12e7c2 Compare February 25, 2020 19:33
@intricate
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 26, 2020

@iohk-bors iohk-bors bot merged commit ba0117e into master Feb 26, 2020
@iohk-bors iohk-bors bot deleted the intricate/txsubout-trace branch February 26, 2020 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus issues related to ouroboros-consensus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants