[#1431] node: Fix 'empty slice declaration using a literal'
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 35s
DCO action / DCO (pull_request) Successful in 1m32s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m53s
Vulncheck / Vulncheck (pull_request) Successful in 2m14s
Build / Build Components (pull_request) Successful in 2m27s
Tests and linters / gopls check (pull_request) Successful in 2m29s
Tests and linters / Staticcheck (pull_request) Successful in 2m58s
Tests and linters / Lint (pull_request) Successful in 3m42s
Tests and linters / Tests (pull_request) Successful in 4m14s
Tests and linters / Tests with -race (pull_request) Successful in 5m28s
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 35s
DCO action / DCO (pull_request) Successful in 1m32s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m53s
Vulncheck / Vulncheck (pull_request) Successful in 2m14s
Build / Build Components (pull_request) Successful in 2m27s
Tests and linters / gopls check (pull_request) Successful in 2m29s
Tests and linters / Staticcheck (pull_request) Successful in 2m58s
Tests and linters / Lint (pull_request) Successful in 3m42s
Tests and linters / Tests (pull_request) Successful in 4m14s
Tests and linters / Tests with -race (pull_request) Successful in 5m28s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
c9afdbe089
commit
a305ba5202
4 changed files with 9 additions and 9 deletions
|
@ -95,7 +95,7 @@ func TestProcessorEmitsGasToNetmapIfNoParsedWallets(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
var emission uint64 = 100_000
|
var emission uint64 = 100_000
|
||||||
var index int = 5
|
var index int = 5
|
||||||
var parsedWallets []util.Uint160 = []util.Uint160{}
|
var parsedWallets []util.Uint160
|
||||||
|
|
||||||
alphabetContracts := innerring.NewAlphabetContracts()
|
alphabetContracts := innerring.NewAlphabetContracts()
|
||||||
for i := range index + 1 {
|
for i := range index + 1 {
|
||||||
|
@ -167,7 +167,7 @@ func TestProcessorDoesntEmitGasIfNoNetmapOrParsedWallets(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
var emission uint64 = 100_000
|
var emission uint64 = 100_000
|
||||||
var index int = 5
|
var index int = 5
|
||||||
var parsedWallets []util.Uint160 = []util.Uint160{}
|
var parsedWallets []util.Uint160
|
||||||
|
|
||||||
alphabetContracts := innerring.NewAlphabetContracts()
|
alphabetContracts := innerring.NewAlphabetContracts()
|
||||||
for i := range index + 1 {
|
for i := range index + 1 {
|
||||||
|
@ -176,7 +176,7 @@ func TestProcessorDoesntEmitGasIfNoNetmapOrParsedWallets(t *testing.T) {
|
||||||
|
|
||||||
morphClient := &testMorphClient{}
|
morphClient := &testMorphClient{}
|
||||||
|
|
||||||
nodes := []netmap.NodeInfo{}
|
var nodes []netmap.NodeInfo
|
||||||
network := &netmap.NetMap{}
|
network := &netmap.NetMap{}
|
||||||
network.SetNodes(nodes)
|
network.SetNodes(nodes)
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,7 @@ func (s *Shard) Close() error {
|
||||||
if s.rb != nil {
|
if s.rb != nil {
|
||||||
s.rb.Stop(s.log)
|
s.rb.Stop(s.log)
|
||||||
}
|
}
|
||||||
components := []interface{ Close() error }{}
|
var components []interface{ Close() error }
|
||||||
|
|
||||||
if s.pilorama != nil {
|
if s.pilorama != nil {
|
||||||
components = append(components, s.pilorama)
|
components = append(components, s.pilorama)
|
||||||
|
|
|
@ -25,7 +25,7 @@ var (
|
||||||
alphaKeys keys.PublicKeys
|
alphaKeys keys.PublicKeys
|
||||||
wrongAlphaKeys 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
|
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)...)
|
wrongDummyInvocationScript = append([]byte{byte(opcode.PUSHDATA1), 64, 1}, make([]byte, 63)...)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func GeneratePayloadPool(count uint, size uint) [][]byte {
|
func GeneratePayloadPool(count uint, size uint) [][]byte {
|
||||||
pool := [][]byte{}
|
var pool [][]byte
|
||||||
for i := uint(0); i < count; i++ {
|
for i := uint(0); i < count; i++ {
|
||||||
payload := make([]byte, size)
|
payload := make([]byte, size)
|
||||||
_, _ = rand.Read(payload)
|
_, _ = rand.Read(payload)
|
||||||
|
@ -29,7 +29,7 @@ func GeneratePayloadPool(count uint, size uint) [][]byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenerateAttributePool(count uint) []objectSDK.Attribute {
|
func GenerateAttributePool(count uint) []objectSDK.Attribute {
|
||||||
pool := []objectSDK.Attribute{}
|
var pool []objectSDK.Attribute
|
||||||
for i := uint(0); i < count; i++ {
|
for i := uint(0); i < count; i++ {
|
||||||
for j := uint(0); j < count; j++ {
|
for j := uint(0); j < count; j++ {
|
||||||
attr := *objectSDK.NewAttribute()
|
attr := *objectSDK.NewAttribute()
|
||||||
|
@ -42,7 +42,7 @@ func GenerateAttributePool(count uint) []objectSDK.Attribute {
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenerateOwnerPool(count uint) []user.ID {
|
func GenerateOwnerPool(count uint) []user.ID {
|
||||||
pool := []user.ID{}
|
var pool []user.ID
|
||||||
for i := uint(0); i < count; i++ {
|
for i := uint(0); i < count; i++ {
|
||||||
pool = append(pool, usertest.ID())
|
pool = append(pool, usertest.ID())
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ func WithPayloadFromPool(pool [][]byte) ObjectOption {
|
||||||
|
|
||||||
func WithAttributesFromPool(pool []objectSDK.Attribute, count uint) ObjectOption {
|
func WithAttributesFromPool(pool []objectSDK.Attribute, count uint) ObjectOption {
|
||||||
return func(obj *objectSDK.Object) {
|
return func(obj *objectSDK.Object) {
|
||||||
attrs := []objectSDK.Attribute{}
|
var attrs []objectSDK.Attribute
|
||||||
for i := uint(0); i < count; i++ {
|
for i := uint(0); i < count; i++ {
|
||||||
attrs = append(attrs, pool[rand.Intn(len(pool))])
|
attrs = append(attrs, pool[rand.Intn(len(pool))])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue