Skip to content

Check BIC before sending a candidacy announcement to avoid blocking the accounts #61

Check BIC before sending a candidacy announcement to avoid blocking the accounts

Check BIC before sending a candidacy announcement to avoid blocking the accounts #61

GitHub Actions / golangci failed Apr 19, 2024 in 0s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (2)

components/validator/issuer.go|170 col 99| type assertion must be checked (forcetypeassert)
components/validator/issuer.go|171 col 187| type assertion must be checked (forcetypeassert)

Filtered Findings (0)

Annotations

Check failure on line 170 in components/validator/issuer.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/validator/issuer.go#L170

type assertion must be checked (forcetypeassert)
Raw output
components/validator/issuer.go:170:99: type assertion must be checked (forcetypeassert)
	if congestionResp.BlockIssuanceCredits < 0 || iotago.Mana(congestionResp.BlockIssuanceCredits) < candidacyBlock.Body.(*iotago.BasicBlockBody).MaxBurnedMana {
	                                                                                                 ^

Check failure on line 171 in components/validator/issuer.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] components/validator/issuer.go#L171

type assertion must be checked (forcetypeassert)
Raw output
components/validator/issuer.go:171:187: type assertion must be checked (forcetypeassert)
		return ierrors.WithMessagef(ErrNotEnoughBlockIssuanceCredits, "account BIC %d is not enough to send candidacy announcement with MaxBurnedMana %d", congestionResp.BlockIssuanceCredits, candidacyBlock.Body.(*iotago.BasicBlockBody).MaxBurnedMana)
		                                                                                                                                                                                        ^