GiB to Bytes
This commit is contained in:
parent
c69d1db1eb
commit
0b7793a927
@ -253,11 +253,11 @@ message`,
|
||||
as a multiplier of the minimum collateral bound`,
|
||||
},
|
||||
{
|
||||
Name: "MaxStagingDealsGiB",
|
||||
Name: "MaxStagingDealsBytes",
|
||||
Type: "int64",
|
||||
|
||||
Comment: `The maximum size of staging deals not yet passed to the sealing node,
|
||||
that the markets service can accept`,
|
||||
Comment: `The maximum allowed disk usage size in bytes of staging deals not yet
|
||||
passed to the sealing node by the markets service`,
|
||||
},
|
||||
{
|
||||
Name: "SimultaneousTransfers",
|
||||
|
@ -126,9 +126,9 @@ type DealmakingConfig struct {
|
||||
// The maximum collateral that the provider will put up against a deal,
|
||||
// as a multiplier of the minimum collateral bound
|
||||
MaxProviderCollateralMultiplier uint64
|
||||
// The maximum size of staging deals not yet passed to the sealing node,
|
||||
// that the markets service can accept
|
||||
MaxStagingDealsGiB int64
|
||||
// The maximum allowed disk usage size in bytes of staging deals not yet
|
||||
// passed to the sealing node by the markets service
|
||||
MaxStagingDealsBytes int64
|
||||
// The maximum number of parallel online data transfers (storage+retrieval)
|
||||
SimultaneousTransfers uint64
|
||||
|
||||
|
@ -542,9 +542,8 @@ func BasicDealFilter(cfg config.DealmakingConfig, user dtypes.StorageDealFilter)
|
||||
return false, "miner error", err
|
||||
}
|
||||
|
||||
diskUsageGiB := diskUsageBytes / 1024 / 1024 / 1024
|
||||
if cfg.MaxStagingDealsGiB != 0 && diskUsageGiB >= cfg.MaxStagingDealsGiB {
|
||||
log.Errorw("proposed deal rejected because there are too many deals in the staging area at the moment", "MaxStagingDealsGiB", cfg.MaxStagingDealsGiB, "DiskUsageGiB", diskUsageGiB)
|
||||
if cfg.MaxStagingDealsBytes != 0 && diskUsageBytes >= cfg.MaxStagingDealsBytes {
|
||||
log.Errorw("proposed deal rejected because there are too many deals in the staging area at the moment", "MaxStagingDealsBytes", cfg.MaxStagingDealsBytes, "DiskUsageBytes", diskUsageBytes)
|
||||
return false, "cannot accept deal as miner is overloaded at the moment - there are too many staging deals being processed", nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user