Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Fix dialyzer warning: 6th item in request tuple is binary, not function. #1716

Merged
merged 1 commit into from Jun 3, 2022

Conversation

ke6jjj
Copy link
Contributor

@ke6jjj ke6jjj commented Jun 3, 2022

Fix a dialyzer warning cause by mistakenly stating that the sixth
element of the tuple that is cached for a target request is a function().
It is not; it's a binary() containing the challenger's signature.

Fix a dialyzer warning cause by mistakenly stating that the sixth
element of the tuple that is cached for a target request is a function().
It is not; it's a binary() containing the challenger's signature.
@ke6jjj
Copy link
Contributor Author

ke6jjj commented Jun 3, 2022

In case you are confused why dialyzer didn't like the old type spec, the "inferred" type came from here:

_ = cache_check_target_req(

The old type specified that the argument being passed as "ChallengerSig" was a function(). It is not. It's clearly a binary().

@Kingofglory2021

This comment was marked as abuse.

Copy link
Contributor

@evanmcc evanmcc left a comment

Choose a reason for hiding this comment

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

This seems OK to get us clean, but ideally we'd also convert to a record here.

@evanmcc evanmcc merged commit 58a4cf3 into master Jun 3, 2022
@evanmcc evanmcc deleted the jsc/miner-dialyzer-fix-fn-not-binary branch June 3, 2022 23: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.

None yet

4 participants