mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-14 04:05:17 +00:00
fix: another byte slice disappearance issue
This commit is contained in:
parent
05acdbf56f
commit
836d449177
@ -123,7 +123,8 @@ func (p *PebbleMasterClockIterator) Value() (*protobufs.ClockFrame, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
frame.FrameNumber = frameNumber
|
frame.FrameNumber = frameNumber
|
||||||
frame.Filter = filter
|
frame.Filter = make([]byte, len(filter))
|
||||||
|
copy(frame.Filter, filter)
|
||||||
|
|
||||||
if len(value) < 521 {
|
if len(value) < 521 {
|
||||||
return nil, errors.Wrap(
|
return nil, errors.Wrap(
|
||||||
@ -132,9 +133,12 @@ func (p *PebbleMasterClockIterator) Value() (*protobufs.ClockFrame, error) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
frame.Difficulty = binary.BigEndian.Uint32(value[:4])
|
copied := make([]byte, len(value))
|
||||||
frame.Input = value[4 : len(value)-516]
|
copy(copied, value)
|
||||||
frame.Output = value[len(value)-516:]
|
|
||||||
|
frame.Difficulty = binary.BigEndian.Uint32(copied[:4])
|
||||||
|
frame.Input = copied[4 : len(copied)-516]
|
||||||
|
frame.Output = copied[len(copied)-516:]
|
||||||
|
|
||||||
previousSelectorBytes := [516]byte{}
|
previousSelectorBytes := [516]byte{}
|
||||||
copy(previousSelectorBytes[:], frame.Input[:516])
|
copy(previousSelectorBytes[:], frame.Input[:516])
|
||||||
|
Loading…
Reference in New Issue
Block a user