Remove static proof type configuration from market subsystem

Instead, use proof type from miner actor. This will, in turn, use the upgraded
proof type if/when it's switched at runtime.

TODO: Consider making this some form of config option instead?
This commit is contained in:
Steven Allen
2020-11-16 19:04:17 +01:00
committed by Łukasz Magiera
parent d8afd71f4c
commit 638900f97f
4 changed files with 17 additions and 5 deletions
+13
View File
@@ -167,6 +167,19 @@ func (n *ProviderNodeAdapter) GetMinerWorkerAddress(ctx context.Context, miner a
return mi.Worker, nil
}
func (n *ProviderNodeAdapter) GetProofType(ctx context.Context, miner address.Address, tok shared.TipSetToken) (abi.RegisteredSealProof, error) {
tsk, err := types.TipSetKeyFromBytes(tok)
if err != nil {
return 0, err
}
mi, err := n.StateMinerInfo(ctx, miner, tsk)
if err != nil {
return 0, err
}
return mi.SealProofType, nil
}
func (n *ProviderNodeAdapter) SignBytes(ctx context.Context, signer address.Address, b []byte) (*crypto.Signature, error) {
signer, err := n.StateAccountKey(ctx, signer, types.EmptyTSK)
if err != nil {