7171 NoDiscovery bool
7272
7373 bootnodes []* enode.Node
74- nodes []* enode.Node
7574 staticNodes []* enode.Node
7675 trustedNodes []* enode.Node
7776 privateKey * ecdsa.PrivateKey
@@ -92,7 +91,7 @@ var SensorCmd = &cobra.Command{
9291 Args : cobra .MinimumNArgs (1 ),
9392 PreRunE : func (cmd * cobra.Command , args []string ) (err error ) {
9493 inputSensorParams .NodesFile = args [0 ]
95- inputSensorParams . nodes , err = p2p .ReadNodeSet (inputSensorParams .NodesFile )
94+ _ , err = p2p .ReadNodeSet (inputSensorParams .NodesFile )
9695 if err != nil {
9796 log .Warn ().Err (err ).Msgf ("Creating nodes file %v because it does not exist" , inputSensorParams .NodesFile )
9897 }
@@ -258,17 +257,6 @@ var SensorCmd = &cobra.Command{
258257 signals := make (chan os.Signal , 1 )
259258 signal .Notify (signals , syscall .SIGINT , syscall .SIGTERM )
260259
261- // peers represents the peer map that is used to write to the nodes.json
262- // file. This is helpful when restarting the node with the --quickstart flag
263- // enabled. This map does not represent the peers that are currently
264- // connected to the sensor. To do that use `server.Peers()` instead.
265- peers := make (map [enode.ID ]string )
266-
267- for _ , node := range inputSensorParams .nodes {
268- // Map node URLs to node IDs to avoid duplicates.
269- peers [node .ID ()] = node .URLv4 ()
270- }
271-
272260 go handleAPI (& server , msgCounter )
273261
274262 // Start the RPC server for receiving transactions
0 commit comments