Skip to content

Commit 6f93ff9

Browse files
lightclientblakehhuynh
authored andcommitted
all: remove version field from rpc.API
1 parent 22f5e83 commit 6f93ff9

File tree

14 files changed

+2
-38
lines changed

14 files changed

+2
-38
lines changed

cmd/clef/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ func signer(c *cli.Context) error {
591591
{
592592
Namespace: "account",
593593
Service: api,
594-
Version: "1.0"},
594+
},
595595
}
596596
if c.Bool(utils.HTTPEnabledFlag.Name) {
597597
vhosts := utils.SplitAndTrim(c.String(utils.HTTPVirtualHostsFlag.Name))

consensus/clique/clique.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,6 @@ func (c *Clique) Close() error {
697697
func (c *Clique) APIs(chain consensus.ChainHeaderReader) []rpc.API {
698698
return []rpc.API{{
699699
Namespace: "clique",
700-
Version: "1.0",
701700
Service: &API{chain: chain, clique: c},
702701
}}
703702
}

consensus/ethash/ethash.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,12 +678,10 @@ func (ethash *Ethash) APIs(chain consensus.ChainHeaderReader) []rpc.API {
678678
return []rpc.API{
679679
{
680680
Namespace: "eth",
681-
Version: "1.0",
682681
Service: &API{ethash},
683682
},
684683
{
685684
Namespace: "ethash",
686-
Version: "1.0",
687685
Service: &API{ethash},
688686
},
689687
}

eth/backend.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,31 +308,24 @@ func (s *Ethereum) APIs() []rpc.API {
308308
return append(apis, []rpc.API{
309309
{
310310
Namespace: "eth",
311-
Version: "1.0",
312311
Service: NewEthereumAPI(s),
313312
}, {
314313
Namespace: "miner",
315-
Version: "1.0",
316314
Service: NewMinerAPI(s),
317315
}, {
318316
Namespace: "eth",
319-
Version: "1.0",
320317
Service: downloader.NewDownloaderAPI(s.handler.downloader, s.eventMux),
321318
}, {
322319
Namespace: "eth",
323-
Version: "1.0",
324320
Service: filters.NewFilterAPI(s.APIBackend, false, 5*time.Minute),
325321
}, {
326322
Namespace: "admin",
327-
Version: "1.0",
328323
Service: NewAdminAPI(s),
329324
}, {
330325
Namespace: "debug",
331-
Version: "1.0",
332326
Service: NewDebugAPI(s),
333327
}, {
334328
Namespace: "net",
335-
Version: "1.0",
336329
Service: s.netRPCService,
337330
},
338331
}...)

eth/catalyst/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ func Register(stack *node.Node, backend *eth.Ethereum) error {
4343
stack.RegisterAPIs([]rpc.API{
4444
{
4545
Namespace: "engine",
46-
Version: "1.0",
4746
Service: NewConsensusAPI(backend),
4847
Authenticated: true,
4948
},

eth/tracers/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,6 @@ func APIs(backend Backend) []rpc.API {
918918
return []rpc.API{
919919
{
920920
Namespace: "debug",
921-
Version: "1.0",
922921
Service: NewAPI(backend),
923922
},
924923
}

internal/ethapi/backend.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,31 +101,24 @@ func GetAPIs(apiBackend Backend) []rpc.API {
101101
return []rpc.API{
102102
{
103103
Namespace: "eth",
104-
Version: "1.0",
105104
Service: NewEthereumAPI(apiBackend),
106105
}, {
107106
Namespace: "eth",
108-
Version: "1.0",
109107
Service: NewBlockChainAPI(apiBackend),
110108
}, {
111109
Namespace: "eth",
112-
Version: "1.0",
113110
Service: NewTransactionAPI(apiBackend, nonceLock),
114111
}, {
115112
Namespace: "txpool",
116-
Version: "1.0",
117113
Service: NewTxPoolAPI(apiBackend),
118114
}, {
119115
Namespace: "debug",
120-
Version: "1.0",
121116
Service: NewDebugAPI(apiBackend),
122117
}, {
123118
Namespace: "eth",
124-
Version: "1.0",
125119
Service: NewEthereumAccountAPI(apiBackend.AccountManager()),
126120
}, {
127121
Namespace: "personal",
128-
Version: "1.0",
129122
Service: NewPersonalAccountAPI(apiBackend, nonceLock),
130123
},
131124
}

les/catalyst/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ func Register(stack *node.Node, backend *les.LightEthereum) error {
3535
stack.RegisterAPIs([]rpc.API{
3636
{
3737
Namespace: "engine",
38-
Version: "1.0",
3938
Service: NewConsensusAPI(backend),
4039
Authenticated: true,
4140
},

les/client.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,27 +294,21 @@ func (s *LightEthereum) APIs() []rpc.API {
294294
return append(apis, []rpc.API{
295295
{
296296
Namespace: "eth",
297-
Version: "1.0",
298297
Service: &LightDummyAPI{},
299298
}, {
300299
Namespace: "eth",
301-
Version: "1.0",
302300
Service: downloader.NewDownloaderAPI(s.handler.downloader, s.eventMux),
303301
}, {
304302
Namespace: "eth",
305-
Version: "1.0",
306303
Service: filters.NewFilterAPI(s.ApiBackend, true, 5*time.Minute),
307304
}, {
308305
Namespace: "net",
309-
Version: "1.0",
310306
Service: s.netRPCService,
311307
}, {
312308
Namespace: "les",
313-
Version: "1.0",
314309
Service: NewLightAPI(&s.lesCommons),
315310
}, {
316311
Namespace: "vflux",
317-
Version: "1.0",
318312
Service: s.serverPool.API(),
319313
},
320314
}...)

les/server.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,14 @@ func (s *LesServer) APIs() []rpc.API {
159159
return []rpc.API{
160160
{
161161
Namespace: "les",
162-
Version: "1.0",
163162
Service: NewLightAPI(&s.lesCommons),
164163
},
165164
{
166165
Namespace: "les",
167-
Version: "1.0",
168166
Service: NewLightServerAPI(s),
169167
},
170168
{
171169
Namespace: "debug",
172-
Version: "1.0",
173170
Service: NewDebugAPI(s),
174171
},
175172
}

0 commit comments

Comments
 (0)