Merge pull request #760 from filecoin-project/fix/array-copy-to-slice
Fix copying partial ticket arrays into slices
This commit is contained in:
commit
bbe86c5fa3
@ -557,8 +557,10 @@ func ComputeProof(ctx context.Context, epp ElectionPoStProver, pi *ProofInput) (
|
||||
PostRand: pi.vrfout,
|
||||
}
|
||||
for _, win := range pi.winners {
|
||||
part := make([]byte, 32)
|
||||
copy(part, win.PartialTicket[:])
|
||||
ept.Candidates = append(ept.Candidates, types.EPostTicket{
|
||||
Partial: win.PartialTicket[:],
|
||||
Partial: part,
|
||||
SectorID: win.SectorID,
|
||||
ChallengeIndex: win.SectorChallengeIndex,
|
||||
})
|
||||
|
@ -73,8 +73,10 @@ func (s *fpostScheduler) runPost(ctx context.Context, eps uint64, ts *types.TipS
|
||||
|
||||
candidates := make([]types.EPostTicket, len(scandidates))
|
||||
for i, sc := range scandidates {
|
||||
part := make([]byte, 32)
|
||||
copy(part, sc.PartialTicket[:])
|
||||
candidates[i] = types.EPostTicket{
|
||||
Partial: sc.PartialTicket[:],
|
||||
Partial: part,
|
||||
SectorID: sc.SectorID,
|
||||
ChallengeIndex: sc.SectorChallengeIndex,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user