mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
swarm/storage: fix NewRandomChunk to allocate 8 bytes for chunk length
This commit is contained in:
parent
4c955d330f
commit
9322249253
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ func NewRandomChunk(chunkSize uint64) *Chunk {
|
|||
c := &Chunk{
|
||||
Key: make([]byte, 32),
|
||||
ReqC: nil,
|
||||
SData: make([]byte, chunkSize),
|
||||
SData: make([]byte, chunkSize+8), // SData should be chunkSize + 8 bytes reserved for length
|
||||
dbStoredC: make(chan bool),
|
||||
dbStoredMu: &sync.Mutex{},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue