better field and struct names + set default appropriately

Storage miners, by default, should be configured to accept storage deals.
This commit is contained in:
laser 2020-06-11 12:15:28 -07:00
parent c458b4712a
commit 5421d0d1c5
2 changed files with 8 additions and 4 deletions

View File

@ -27,11 +27,11 @@ type FullNode struct {
type StorageMiner struct {
Common
StorageDeals StorageDealConfig
Dealmaking DealmakingConfig
Storage sectorstorage.SealerConfig
}
type StorageDealConfig struct {
type DealmakingConfig struct {
IsAcceptingStorageDeals bool
}
@ -114,6 +114,10 @@ func DefaultStorageMiner() *StorageMiner {
AllowCommit: true,
AllowUnseal: true,
},
Dealmaking: DealmakingConfig{
IsAcceptingStorageDeals: true,
},
}
cfg.Common.API.ListenAddress = "/ip4/127.0.0.1/tcp/2345/http"
cfg.Common.API.RemoteListenAddress = "127.0.0.1:2345"

View File

@ -389,6 +389,6 @@ func NewIsAcceptingStorageDealsFunc(r repo.LockedRepo) (dtypes.IsAcceptingStorag
return false, xerrors.New("expected address of config.StorageMiner")
}
return cfg.StorageDeals.IsAcceptingStorageDeals, nil
return cfg.Dealmaking.IsAcceptingStorageDeals, nil
}, nil
}