Skip checking the initial power table CID if undefined (#12725)

In Lotus F3 cli Only check the expected power table CID when it is
present.
This commit is contained in:
Masih H. Derkani
2024-11-26 10:49:43 +00:00
committed by GitHub
parent 5791b4a978
commit c9cbef343b

View File

@ -162,7 +162,7 @@ var f3SubCmdPowerTable = &cli.Command{
if err != nil {
return fmt.Errorf("gettingh power table CID at instance %d: %w", instance, err)
}
if !expectedPowerTableCID.Equals(actualPowerTableCID) {
if !cid.Undef.Equals(expectedPowerTableCID) && !expectedPowerTableCID.Equals(actualPowerTableCID) {
return fmt.Errorf("expected power table CID %s at instance %d, got: %s", expectedPowerTableCID, instance, actualPowerTableCID)
}
result.PowerTable.CID = actualPowerTableCID.String()
@ -247,7 +247,7 @@ var f3SubCmdPowerTable = &cli.Command{
if err != nil {
return fmt.Errorf("gettingh power table CID at instance %d: %w", instance, err)
}
if !expectedPowerTableCID.Equals(actualPowerTableCID) {
if !cid.Undef.Equals(expectedPowerTableCID) && !expectedPowerTableCID.Equals(actualPowerTableCID) {
return fmt.Errorf("expected power table CID %s at instance %d, got: %s", expectedPowerTableCID, instance, actualPowerTableCID)
}
result.PowerTable.CID = actualPowerTableCID.String()