Skip to content

Commit df0722c

Browse files
Fix missing depedencies Node address info (#1332) (#1333)
* fix missing dependencies on node address info * add missing depedencies on cmd Co-authored-by: Gede Sukra Widhyawan <g.sukrawidhyawan02@gmail.com>
1 parent 52a988e commit df0722c

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

cmd/block/blockGenerator.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@ package block
22

33
import (
44
"fmt"
5-
"github.com/zoobc/zoobc-core/common/crypto"
6-
"github.com/zoobc/zoobc-core/common/signaturetype"
75
"strings"
86
"time"
97

10-
"github.com/zoobc/zoobc-core/common/monitoring"
11-
128
log "github.com/sirupsen/logrus"
139
"github.com/spf13/cobra"
1410
"github.com/zoobc/zoobc-core/common/auth"
1511
"github.com/zoobc/zoobc-core/common/chaintype"
12+
"github.com/zoobc/zoobc-core/common/crypto"
1613
"github.com/zoobc/zoobc-core/common/database"
1714
"github.com/zoobc/zoobc-core/common/fee"
1815
"github.com/zoobc/zoobc-core/common/model"
16+
"github.com/zoobc/zoobc-core/common/monitoring"
1917
"github.com/zoobc/zoobc-core/common/query"
18+
"github.com/zoobc/zoobc-core/common/signaturetype"
2019
"github.com/zoobc/zoobc-core/common/storage"
2120
"github.com/zoobc/zoobc-core/common/transaction"
2221
"github.com/zoobc/zoobc-core/core/service"
@@ -172,6 +171,7 @@ func initialize(
172171
nodeAddressInfoStorage,
173172
nil,
174173
nil,
174+
nil,
175175
log.New(),
176176
)
177177
activeNodeRegistryCacheStorage := storage.NewNodeRegistryCacheStorage(monitoring.TypeActiveNodeRegistryStorage, nil)

cmd/scramblednodes/scramblednodes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import (
55
"encoding/json"
66
"fmt"
77

8-
"github.com/zoobc/zoobc-core/common/monitoring"
9-
108
"github.com/sirupsen/logrus"
119
"github.com/spf13/cobra"
1210
"github.com/zoobc/zoobc-core/common/chaintype"
1311
"github.com/zoobc/zoobc-core/common/constant"
1412
"github.com/zoobc/zoobc-core/common/database"
1513
"github.com/zoobc/zoobc-core/common/model"
14+
"github.com/zoobc/zoobc-core/common/monitoring"
1615
"github.com/zoobc/zoobc-core/common/query"
1716
"github.com/zoobc/zoobc-core/common/storage"
1817
"github.com/zoobc/zoobc-core/core/service"
@@ -109,6 +108,7 @@ func getScrambledNodesAtHeight() *model.ScrambledNodes {
109108
storage.NewNodeAddressInfoStorage(),
110109
nil,
111110
activeNodeRegistryCacheStorage,
111+
nil,
112112
logrus.New(),
113113
)
114114

core/service/nodeAddressInfoService.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func NewNodeAddressInfoService(
7373
blockQuery query.BlockQueryInterface,
7474
signature crypto.SignatureInterface,
7575
nodeAddressesInfoStorage, mainBlockStateStorage, activeNodeRegistryCache storage.CacheStorageInterface,
76+
mainBlocksStorage storage.CacheStackStorageInterface,
7677
logger *log.Logger,
7778
) *NodeAddressInfoService {
7879
return &NodeAddressInfoService{
@@ -84,6 +85,7 @@ func NewNodeAddressInfoService(
8485
NodeAddressInfoStorage: nodeAddressesInfoStorage,
8586
MainBlockStateStorage: mainBlockStateStorage,
8687
ActiveNodeRegistryCache: activeNodeRegistryCache,
88+
MainBlocksStorage: mainBlocksStorage,
8789
Logger: logger,
8890
}
8991
}

main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"encoding/binary"
77
"encoding/hex"
88
"fmt"
9-
"github.com/zoobc/zoobc-core/common/signaturetype"
109
"net/http"
1110
_ "net/http/pprof"
1211
"os"
@@ -17,14 +16,13 @@ import (
1716
"syscall"
1817
"time"
1918

20-
"github.com/zoobc/zoobc-core/common/accounttype"
21-
2219
log "github.com/sirupsen/logrus"
2320
"github.com/spf13/cobra"
2421
"github.com/spf13/viper"
2522
"github.com/takama/daemon"
2623
"github.com/ugorji/go/codec"
2724
"github.com/zoobc/zoobc-core/api"
25+
"github.com/zoobc/zoobc-core/common/accounttype"
2826
"github.com/zoobc/zoobc-core/common/auth"
2927
"github.com/zoobc/zoobc-core/common/blocker"
3028
"github.com/zoobc/zoobc-core/common/chaintype"
@@ -35,6 +33,7 @@ import (
3533
"github.com/zoobc/zoobc-core/common/model"
3634
"github.com/zoobc/zoobc-core/common/monitoring"
3735
"github.com/zoobc/zoobc-core/common/query"
36+
"github.com/zoobc/zoobc-core/common/signaturetype"
3837
"github.com/zoobc/zoobc-core/common/storage"
3938
"github.com/zoobc/zoobc-core/common/transaction"
4039
"github.com/zoobc/zoobc-core/common/util"
@@ -354,6 +353,7 @@ func initiateMainInstance() {
354353
nodeAddressInfoStorage,
355354
mainBlockStateStorage,
356355
activeNodeRegistryCacheStorage,
356+
mainBlocksStorage,
357357
loggerCoreService,
358358
)
359359
nodeRegistrationService = service.NewNodeRegistrationService(

0 commit comments

Comments
 (0)