Merge pull request #9507 from ipfs-force-community/fix/some-issue

fix: use api.ErrActorNotFound instead of types.ErrActorNotFound & add fields to ForkUpgradeParams
This commit is contained in:
Aayush Rajasekaran 2022-10-24 13:49:27 -04:00 committed by GitHub
commit 23f8bac05b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 4 deletions

View File

@ -331,4 +331,6 @@ type ForkUpgradeParams struct {
UpgradeHyperdriveHeight abi.ChainEpoch
UpgradeChocolateHeight abi.ChainEpoch
UpgradeOhSnapHeight abi.ChainEpoch
UpgradeSkyrHeight abi.ChainEpoch
UpgradeSharkHeight abi.ChainEpoch
}

Binary file not shown.

View File

@ -5442,7 +5442,9 @@ Response:
"UpgradeTurboHeight": 10101,
"UpgradeHyperdriveHeight": 10101,
"UpgradeChocolateHeight": 10101,
"UpgradeOhSnapHeight": 10101
"UpgradeOhSnapHeight": 10101,
"UpgradeSkyrHeight": 10101,
"UpgradeSharkHeight": 10101
}
}
```

View File

@ -5949,7 +5949,9 @@ Response:
"UpgradeTurboHeight": 10101,
"UpgradeHyperdriveHeight": 10101,
"UpgradeChocolateHeight": 10101,
"UpgradeOhSnapHeight": 10101
"UpgradeOhSnapHeight": 10101,
"UpgradeSkyrHeight": 10101,
"UpgradeSharkHeight": 10101
}
}
```

View File

@ -11,3 +11,4 @@
- [ ] Schedule
- [ ] Migration
- [ ] Update upgrade schedule in `chain/sync_test.go`
- [ ] Add upgrade field to `api/types.go/ForkUpgradeParams` and update the implementation of StateGetNetworkParams

View File

@ -1093,7 +1093,7 @@ func (a *StateAPI) StateListMessages(ctx context.Context, match *api.MessageMatc
_, err := a.StateLookupID(ctx, match.To, tsk)
// if the recipient doesn't exist at the start point, we're not gonna find any matches
if xerrors.Is(err, types.ErrActorNotFound) {
if xerrors.Is(err, &api.ErrActorNotFound{}) {
return nil, nil
}
@ -1104,7 +1104,7 @@ func (a *StateAPI) StateListMessages(ctx context.Context, match *api.MessageMatc
_, err := a.StateLookupID(ctx, match.From, tsk)
// if the sender doesn't exist at the start point, we're not gonna find any matches
if xerrors.Is(err, types.ErrActorNotFound) {
if xerrors.Is(err, &api.ErrActorNotFound{}) {
return nil, nil
}
@ -1797,6 +1797,8 @@ func (a *StateAPI) StateGetNetworkParams(ctx context.Context) (*api.NetworkParam
UpgradeHyperdriveHeight: build.UpgradeHyperdriveHeight,
UpgradeChocolateHeight: build.UpgradeChocolateHeight,
UpgradeOhSnapHeight: build.UpgradeOhSnapHeight,
UpgradeSkyrHeight: build.UpgradeSkyrHeight,
UpgradeSharkHeight: build.UpgradeSharkHeight,
},
}, nil
}