forked from TrueCloudLab/frostfs-sdk-go
[#42] netmap: move package from neofs-api-go
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
1bd89bf797
commit
369bd382b3
24 changed files with 3881 additions and 0 deletions
37
netmap/test/generate.go
Normal file
37
netmap/test/generate.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
package test
|
||||
|
||||
import "github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
|
||||
// NetworkParameter returns random netmap.NetworkParameter.
|
||||
func NetworkParameter() *netmap.NetworkParameter {
|
||||
x := netmap.NewNetworkParameter()
|
||||
|
||||
x.SetKey([]byte("key"))
|
||||
x.SetValue([]byte("value"))
|
||||
|
||||
return x
|
||||
}
|
||||
|
||||
// NetworkConfig returns random netmap.NetworkConfig.
|
||||
func NetworkConfig() *netmap.NetworkConfig {
|
||||
x := netmap.NewNetworkConfig()
|
||||
|
||||
x.SetParameters(
|
||||
NetworkParameter(),
|
||||
NetworkParameter(),
|
||||
)
|
||||
|
||||
return x
|
||||
}
|
||||
|
||||
// NetworkInfo returns random netmap.NetworkInfo.
|
||||
func NetworkInfo() *netmap.NetworkInfo {
|
||||
x := netmap.NewNetworkInfo()
|
||||
|
||||
x.SetCurrentEpoch(21)
|
||||
x.SetMagicNumber(32)
|
||||
x.SetMsPerBlock(43)
|
||||
x.SetNetworkConfig(NetworkConfig())
|
||||
|
||||
return x
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue