mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
started dpa_test
This commit is contained in:
parent
71f1695b87
commit
dca79894d1
3 changed files with 12 additions and 13 deletions
|
|
@ -2,7 +2,6 @@ package bzz
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
@ -14,15 +13,6 @@ import (
|
|||
Tests TreeChunker by splitting and joining a random byte slice
|
||||
*/
|
||||
|
||||
func testDataReader(l int) (r *ChunkReader, slice []byte) {
|
||||
slice = make([]byte, l)
|
||||
if _, err := rand.Read(slice); err != nil {
|
||||
panic("rand error")
|
||||
}
|
||||
r = NewChunkReaderFromBytes(slice)
|
||||
return
|
||||
}
|
||||
|
||||
type chunkerTester struct {
|
||||
errors []error
|
||||
chunks []*Chunk
|
||||
|
|
|
|||
|
|
@ -5,6 +5,15 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func testDataReader(l int) (r *ChunkReader, slice []byte) {
|
||||
slice = make([]byte, l)
|
||||
if _, err := rand.Read(slice); err != nil {
|
||||
panic("rand error")
|
||||
}
|
||||
r = NewChunkReaderFromBytes(slice)
|
||||
return
|
||||
}
|
||||
|
||||
func randomChunks(l int64, branches int64, chunkC chan *Chunk) (key Key, errC chan error) {
|
||||
chunker := &TreeChunker{
|
||||
Branches: branches,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// test bench for the package blockhash
|
||||
|
||||
package bzz
|
||||
|
||||
import ()
|
||||
import (
|
||||
// "github.com/ethereum/go-ethereum/bzz/test"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue