diff --git a/documentation/en/default-lotus-miner-config.toml b/documentation/en/default-lotus-miner-config.toml index b16c0e8fd..b51e325e8 100644 --- a/documentation/en/default-lotus-miner-config.toml +++ b/documentation/en/default-lotus-miner-config.toml @@ -401,11 +401,11 @@ # env var: LOTUS_PROVING_MAXPARTITIONSPERRECOVERYMESSAGE #MaxPartitionsPerRecoveryMessage = 0 - # Enable single partition per Post Message for partitions containing recovery sectors + # Enable single partition per PoSt Message for partitions containing recovery sectors # # In cases when submitting PoSt messages which contain recovering sectors, the default network limit may still be # too high to fit in the block gas limit. In those cases, it becomes useful to only house the single partition - # with recovery sectors in the post message + # with recovering sectors in the post message # # Note that setting this value lower may result in less efficient gas use - more messages will be sent, # to prove each deadline, resulting in more total gas use (but each message will have lower gas limit) diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index fe805407a..80538c70e 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -719,11 +719,11 @@ resulting in more total gas use (but each message will have lower gas limit)`, Name: "SingleRecoveringPartitionPerPostMessage", Type: "bool", - Comment: `Enable single partition per Post Message for partitions containing recovery sectors + Comment: `Enable single partition per PoSt Message for partitions containing recovery sectors In cases when submitting PoSt messages which contain recovering sectors, the default network limit may still be too high to fit in the block gas limit. In those cases, it becomes useful to only house the single partition -with recovery sectors in the post message +with recovering sectors in the post message Note that setting this value lower may result in less efficient gas use - more messages will be sent, to prove each deadline, resulting in more total gas use (but each message will have lower gas limit)`, diff --git a/node/config/types.go b/node/config/types.go index 52b5e6554..df5f018e3 100644 --- a/node/config/types.go +++ b/node/config/types.go @@ -293,11 +293,11 @@ type ProvingConfig struct { // resulting in more total gas use (but each message will have lower gas limit) MaxPartitionsPerRecoveryMessage int - // Enable single partition per Post Message for partitions containing recovery sectors + // Enable single partition per PoSt Message for partitions containing recovery sectors // // In cases when submitting PoSt messages which contain recovering sectors, the default network limit may still be // too high to fit in the block gas limit. In those cases, it becomes useful to only house the single partition - // with recovery sectors in the post message + // with recovering sectors in the post message // // Note that setting this value lower may result in less efficient gas use - more messages will be sent, // to prove each deadline, resulting in more total gas use (but each message will have lower gas limit) diff --git a/storage/wdpost/wdpost_run.go b/storage/wdpost/wdpost_run.go index f34cf7c0c..53b7d55c9 100644 --- a/storage/wdpost/wdpost_run.go +++ b/storage/wdpost/wdpost_run.go @@ -529,8 +529,8 @@ func (s *WindowPoStScheduler) BatchPartitions(partitions []api.Partition, nv net batches := [][]api.Partition{} currBatch := []api.Partition{} - for i := 0; i < len(partitions); i++ { - recSectors, err := partitions[i].RecoveringSectors.Count() + for _, partition := range partitions { + recSectors, err := partition.RecoveringSectors.Count() if err != nil { return nil, err } @@ -542,13 +542,13 @@ func (s *WindowPoStScheduler) BatchPartitions(partitions []api.Partition, nv net batches = append(batches, currBatch) currBatch = []api.Partition{} } - batches = append(batches, []api.Partition{partitions[i]}) + batches = append(batches, []api.Partition{partition}) } else { if len(currBatch) >= partitionsPerMsg { batches = append(batches, currBatch) currBatch = []api.Partition{} } - currBatch = append(currBatch, partitions[i]) + currBatch = append(currBatch, partition) } } if len(currBatch) > 0 {