[#307] v2/storagegroup/test: Do not allocate memory if `!empty`

Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
remotes/KirillovDenis/feature/refactor-sig-rpc
Pavel Karpy 2021-06-11 15:45:04 +03:00 committed by Alex Vanin
parent 383edb1be4
commit 9dfc7e7fe9
1 changed files with 1 additions and 1 deletions

View File

@ -11,10 +11,10 @@ func GenerateStorageGroup(empty bool) *storagegroup.StorageGroup {
if !empty {
m.SetValidationDataSize(44)
m.SetExpirationEpoch(55)
m.SetMembers(refstest.GenerateObjectIDs(false))
}
m.SetValidationHash(refstest.GenerateChecksum(empty))
m.SetMembers(refstest.GenerateObjectIDs(empty))
return m
}