0bf12523e1
Change-Id: I1f5065b3d15cc93f4b42868941e82e04af364565
26 lines
582 B
Go
26 lines
582 B
Go
// Copyright (C) 2022 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package blockchaintest
|
|
|
|
import (
|
|
"storj.io/common/testrand"
|
|
"storj.io/storj/private/blockchain"
|
|
)
|
|
|
|
// NewAddress creates new blockchain address for testing.
|
|
func NewAddress() blockchain.Address {
|
|
var address blockchain.Address
|
|
b := testrand.BytesInt(blockchain.AddressLength)
|
|
copy(address[:], b)
|
|
return address
|
|
}
|
|
|
|
// NewHash creates new blockchain hash for testing.
|
|
func NewHash() blockchain.Hash {
|
|
var h blockchain.Hash
|
|
b := testrand.BytesInt(blockchain.HashLength)
|
|
copy(h[:], b)
|
|
return h
|
|
}
|