storj/satellite/payments/storjscan/blockchaintest/blockchaintest.go
Yaroslav Vorobiov 0bf12523e1 satellite/payments/storjscan: add client and list all payments API call
Change-Id: I1f5065b3d15cc93f4b42868941e82e04af364565
2022-05-20 15:10:17 +00:00

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
}