Merge pull request #5620 from filecoin-project/feat/disable-owner-worker-fallback
miner: Config to disable owner/worker address fallback
This commit is contained in:
@@ -157,6 +157,9 @@ func AddressSelector(addrConf *config.MinerAddressConfig) func() (*storage.Addre
|
||||
return as, nil
|
||||
}
|
||||
|
||||
as.DisableOwnerFallback = addrConf.DisableOwnerFallback
|
||||
as.DisableWorkerFallback = addrConf.DisableWorkerFallback
|
||||
|
||||
for _, s := range addrConf.PreCommitControl {
|
||||
addr, err := address.NewFromString(s)
|
||||
if err != nil {
|
||||
@@ -175,6 +178,15 @@ func AddressSelector(addrConf *config.MinerAddressConfig) func() (*storage.Addre
|
||||
as.CommitControl = append(as.CommitControl, addr)
|
||||
}
|
||||
|
||||
for _, s := range addrConf.TerminateControl {
|
||||
addr, err := address.NewFromString(s)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("parsing terminate control address: %w", err)
|
||||
}
|
||||
|
||||
as.TerminateControl = append(as.TerminateControl, addr)
|
||||
}
|
||||
|
||||
return as, nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user