Skip to content

Commit 8627a9f

Browse files
lightclientjagdeep sidhu
authored andcommitted
all: remove public field from rpc.API (ethereum#25059)
all: remove public field from rpc.API
1 parent 16a92a1 commit 8627a9f

File tree

14 files changed

+6
-39
lines changed

14 files changed

+6
-39
lines changed

cmd/clef/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,6 @@ func signer(c *cli.Context) error {
647647
rpcAPI := []rpc.API{
648648
{
649649
Namespace: "account",
650-
Public: true,
651650
Service: api,
652651
Version: "1.0"},
653652
}
@@ -656,7 +655,7 @@ func signer(c *cli.Context) error {
656655
cors := utils.SplitAndTrim(c.GlobalString(utils.HTTPCORSDomainFlag.Name))
657656

658657
srv := rpc.NewServer()
659-
err := node.RegisterApis(rpcAPI, []string{"account"}, srv, false)
658+
err := node.RegisterApis(rpcAPI, []string{"account"}, srv)
660659
if err != nil {
661660
utils.Fatalf("Could not register API: %w", err)
662661
}

consensus/clique/clique.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,6 @@ func (c *Clique) APIs(chain consensus.ChainHeaderReader) []rpc.API {
699699
Namespace: "clique",
700700
Version: "1.0",
701701
Service: &API{chain: chain, clique: c},
702-
Public: false,
703702
}}
704703
}
705704

consensus/ethash/ethash.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,13 +681,11 @@ func (ethash *Ethash) APIs(chain consensus.ChainHeaderReader) []rpc.API {
681681
Namespace: "eth",
682682
Version: "1.0",
683683
Service: &API{ethash},
684-
Public: true,
685684
},
686685
{
687686
Namespace: "ethash",
688687
Version: "1.0",
689688
Service: &API{ethash},
690-
Public: true,
691689
},
692690
}
693691
}

eth/backend.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -459,22 +459,18 @@ func (s *Ethereum) APIs() []rpc.API {
459459
Namespace: "eth",
460460
Version: "1.0",
461461
Service: NewEthereumAPI(s),
462-
Public: true,
463462
}, {
464463
Namespace: "miner",
465464
Version: "1.0",
466465
Service: NewMinerAPI(s),
467-
Public: true,
468466
}, {
469467
Namespace: "eth",
470468
Version: "1.0",
471469
Service: downloader.NewDownloaderAPI(s.handler.downloader, s.eventMux),
472-
Public: true,
473470
}, {
474471
Namespace: "eth",
475472
Version: "1.0",
476473
Service: filters.NewFilterAPI(s.APIBackend, false, 5*time.Minute),
477-
Public: true,
478474
}, {
479475
Namespace: "admin",
480476
Version: "1.0",
@@ -483,12 +479,10 @@ func (s *Ethereum) APIs() []rpc.API {
483479
Namespace: "debug",
484480
Version: "1.0",
485481
Service: NewDebugAPI(s),
486-
Public: true,
487482
}, {
488483
Namespace: "net",
489484
Version: "1.0",
490485
Service: s.netRPCService,
491-
Public: true,
492486
},
493487
}...)
494488
}

eth/catalyst/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ func Register(stack *node.Node, backend *eth.Ethereum) error {
4444
Namespace: "engine",
4545
Version: "1.0",
4646
Service: NewConsensusAPI(backend),
47-
Public: true,
4847
Authenticated: true,
4948
},
5049
})

eth/tracers/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,6 @@ func APIs(backend Backend) []rpc.API {
939939
Namespace: "debug",
940940
Version: "1.0",
941941
Service: NewAPI(backend),
942-
Public: false,
943942
},
944943
}
945944
}

internal/ethapi/backend.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,37 +106,30 @@ func GetAPIs(apiBackend Backend) []rpc.API {
106106
Namespace: "eth",
107107
Version: "1.0",
108108
Service: NewEthereumAPI(apiBackend),
109-
Public: true,
110109
}, {
111110
Namespace: "eth",
112111
Version: "1.0",
113112
Service: NewBlockChainAPI(apiBackend),
114-
Public: true,
115113
}, {
116114
Namespace: "eth",
117115
Version: "1.0",
118116
Service: NewTransactionAPI(apiBackend, nonceLock),
119-
Public: true,
120117
}, {
121118
Namespace: "txpool",
122119
Version: "1.0",
123120
Service: NewTxPoolAPI(apiBackend),
124-
Public: true,
125121
}, {
126122
Namespace: "debug",
127123
Version: "1.0",
128124
Service: NewDebugAPI(apiBackend),
129-
Public: true,
130125
}, {
131126
Namespace: "eth",
132127
Version: "1.0",
133128
Service: NewEthereumAccountAPI(apiBackend.AccountManager()),
134-
Public: true,
135129
}, {
136130
Namespace: "personal",
137131
Version: "1.0",
138132
Service: NewPersonalAccountAPI(apiBackend, nonceLock),
139-
Public: false,
140133
},
141134
}
142135
}

les/catalyst/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ func Register(stack *node.Node, backend *les.LightEthereum) error {
3737
Namespace: "engine",
3838
Version: "1.0",
3939
Service: NewConsensusAPI(backend),
40-
Public: true,
4140
Authenticated: true,
4241
},
4342
})

les/client.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,32 +416,26 @@ func (s *LightEthereum) APIs() []rpc.API {
416416
Namespace: "eth",
417417
Version: "1.0",
418418
Service: &LightDummyAPI{},
419-
Public: true,
420419
}, {
421420
Namespace: "eth",
422421
Version: "1.0",
423422
Service: downloader.NewDownloaderAPI(s.handler.downloader, s.eventMux),
424-
Public: true,
425423
}, {
426424
Namespace: "eth",
427425
Version: "1.0",
428426
Service: filters.NewFilterAPI(s.ApiBackend, true, 5*time.Minute),
429-
Public: true,
430427
}, {
431428
Namespace: "net",
432429
Version: "1.0",
433430
Service: s.netRPCService,
434-
Public: true,
435431
}, {
436432
Namespace: "les",
437433
Version: "1.0",
438434
Service: NewLightAPI(&s.lesCommons),
439-
Public: false,
440435
}, {
441436
Namespace: "vflux",
442437
Version: "1.0",
443438
Service: s.serverPool.API(),
444-
Public: false,
445439
},
446440
}...)
447441
}

les/server.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,16 @@ func (s *LesServer) APIs() []rpc.API {
161161
Namespace: "les",
162162
Version: "1.0",
163163
Service: NewLightAPI(&s.lesCommons),
164-
Public: false,
165164
},
166165
{
167166
Namespace: "les",
168167
Version: "1.0",
169168
Service: NewLightServerAPI(s),
170-
Public: false,
171169
},
172170
{
173171
Namespace: "debug",
174172
Version: "1.0",
175173
Service: NewDebugAPI(s),
176-
Public: false,
177174
},
178175
}
179176
}

0 commit comments

Comments
 (0)