Merge pull request #10569 from filecoin-project/fix/panic-index-oor
fix: proving: Initialize slice with with same length as partition
This commit is contained in:
commit
2120fae2b6
@ -658,6 +658,10 @@ It will not send any messages to the chain.`,
|
|||||||
for _, i := range res {
|
for _, i := range res {
|
||||||
var postParam SubmitWindowedPoStParams
|
var postParam SubmitWindowedPoStParams
|
||||||
postParam.Deadline = i.Deadline
|
postParam.Deadline = i.Deadline
|
||||||
|
|
||||||
|
// Initialize the postParam.Partitions slice with the same length as i.Partitions
|
||||||
|
postParam.Partitions = make([]PoStPartition, len(i.Partitions))
|
||||||
|
|
||||||
for id, part := range i.Partitions {
|
for id, part := range i.Partitions {
|
||||||
postParam.Partitions[id].Index = part.Index
|
postParam.Partitions[id].Index = part.Index
|
||||||
count, err := part.Skipped.Count()
|
count, err := part.Skipped.Count()
|
||||||
|
Loading…
Reference in New Issue
Block a user