-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(f3): test API during inactive-F3 modes and make consistent and safe #12781
Conversation
@masih can you have a look at Lines 355 to 357 in 2666c3e
F3GetManifest is only going to error if F3 is fully disabled, so I'm not sure what this error check was for. Am I safe to remove the error check and just return false when the manifest is nil ? That would be equivalent to the existing behaviour but I'm not sure whether I'm exposing something of interest in the process of doing this.
|
Yes, returning false on either error or mismatching Manifest should be fine. Looks like the cause of tests failing is mismatching manifest though. |
2666c3e
to
3631bf6
Compare
Ah, got it, I accidentally introduced a new error condition in |
Closes: #12772
GetManifest
panic"F3
but we have some"f3
)GetManifest
now copies the"no known network manifest"
error message thatGetF3PowerTable
returns (from inside go-f3) during the not-running stateclient.F3GetOrRenewParticipationTicket
now returnsnil
as the zero value ofapi.F3ParticipationTicket
which is a slice, like the innerlf3/leaser.getOrRenewParticipationTicket
returns, so we don't getnil
in one case and[]
in anotherOne minor special case is
F3GetECPowerTable
returns a sensible value when F3 isn't ready, so it's only when it's properly disabled that it gives an error. This seems reasonable even if it feels mildly inconsistent.