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:
committed by
Łukasz Magiera
parent
d8afd71f4c
commit
638900f97f
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user