[#1431] node: Fix 'empty slice declaration using a literal'
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
d83879d4b8
commit
41038b2ec0
4 changed files with 9 additions and 9 deletions
|
@ -95,7 +95,7 @@ func TestProcessorEmitsGasToNetmapIfNoParsedWallets(t *testing.T) {
|
|||
t.Parallel()
|
||||
var emission uint64 = 100_000
|
||||
var index int = 5
|
||||
var parsedWallets []util.Uint160 = []util.Uint160{}
|
||||
var parsedWallets []util.Uint160
|
||||
|
||||
alphabetContracts := innerring.NewAlphabetContracts()
|
||||
for i := range index + 1 {
|
||||
|
@ -167,7 +167,7 @@ func TestProcessorDoesntEmitGasIfNoNetmapOrParsedWallets(t *testing.T) {
|
|||
t.Parallel()
|
||||
var emission uint64 = 100_000
|
||||
var index int = 5
|
||||
var parsedWallets []util.Uint160 = []util.Uint160{}
|
||||
var parsedWallets []util.Uint160
|
||||
|
||||
alphabetContracts := innerring.NewAlphabetContracts()
|
||||
for i := range index + 1 {
|
||||
|
@ -176,7 +176,7 @@ func TestProcessorDoesntEmitGasIfNoNetmapOrParsedWallets(t *testing.T) {
|
|||
|
||||
morphClient := &testMorphClient{}
|
||||
|
||||
nodes := []netmap.NodeInfo{}
|
||||
var nodes []netmap.NodeInfo
|
||||
network := &netmap.NetMap{}
|
||||
network.SetNodes(nodes)
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ func (s *Shard) Close() error {
|
|||
if s.rb != nil {
|
||||
s.rb.Stop(s.log)
|
||||
}
|
||||
components := []interface{ Close() error }{}
|
||||
var components []interface{ Close() error }
|
||||
|
||||
if s.pilorama != nil {
|
||||
components = append(components, s.pilorama)
|
||||
|
|
|
@ -25,7 +25,7 @@ var (
|
|||
alphaKeys keys.PublicKeys
|
||||
wrongAlphaKeys keys.PublicKeys
|
||||
|
||||
dummyAlphabetInvocationScript = []byte{} // expected to be empty if generated by Notary Actor, as requester can't fill it in
|
||||
dummyAlphabetInvocationScript []byte
|
||||
dummyAlphabetInvocationScriptOld = append([]byte{byte(opcode.PUSHDATA1), 64}, make([]byte, 64)...) // expected to be dummy if generated manually
|
||||
wrongDummyInvocationScript = append([]byte{byte(opcode.PUSHDATA1), 64, 1}, make([]byte, 63)...)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
)
|
||||
|
||||
func GeneratePayloadPool(count uint, size uint) [][]byte {
|
||||
pool := [][]byte{}
|
||||
var pool [][]byte
|
||||
for i := uint(0); i < count; i++ {
|
||||
payload := make([]byte, size)
|
||||
_, _ = rand.Read(payload)
|
||||
|
@ -29,7 +29,7 @@ func GeneratePayloadPool(count uint, size uint) [][]byte {
|
|||
}
|
||||
|
||||
func GenerateAttributePool(count uint) []objectSDK.Attribute {
|
||||
pool := []objectSDK.Attribute{}
|
||||
var pool []objectSDK.Attribute
|
||||
for i := uint(0); i < count; i++ {
|
||||
for j := uint(0); j < count; j++ {
|
||||
attr := *objectSDK.NewAttribute()
|
||||
|
@ -42,7 +42,7 @@ func GenerateAttributePool(count uint) []objectSDK.Attribute {
|
|||
}
|
||||
|
||||
func GenerateOwnerPool(count uint) []user.ID {
|
||||
pool := []user.ID{}
|
||||
var pool []user.ID
|
||||
for i := uint(0); i < count; i++ {
|
||||
pool = append(pool, usertest.ID())
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ func WithPayloadFromPool(pool [][]byte) ObjectOption {
|
|||
|
||||
func WithAttributesFromPool(pool []objectSDK.Attribute, count uint) ObjectOption {
|
||||
return func(obj *objectSDK.Object) {
|
||||
attrs := []objectSDK.Attribute{}
|
||||
var attrs []objectSDK.Attribute
|
||||
for i := uint(0); i < count; i++ {
|
||||
attrs = append(attrs, pool[rand.Intn(len(pool))])
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue