mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
parent
4fb622bfd0
commit
94b3ca1eeb
9 changed files with 1 additions and 28 deletions
|
|
@ -144,7 +144,6 @@ func (XDCx *XDCX) APIs() []rpc.API {
|
|||
return []rpc.API{
|
||||
{
|
||||
Namespace: ProtocolName,
|
||||
Version: ProtocolVersionStr,
|
||||
Service: NewPublicXDCXAPI(XDCx),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ func (l *Lending) APIs() []rpc.API {
|
|||
return []rpc.API{
|
||||
{
|
||||
Namespace: ProtocolName,
|
||||
Version: ProtocolVersionStr,
|
||||
Service: NewPublicXDCXLendingAPI(l),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,6 @@ func (x *XDPoS) Initial(chain consensus.ChainReader, header *types.Header) error
|
|||
func (x *XDPoS) APIs(chain consensus.ChainReader) []rpc.API {
|
||||
return []rpc.API{{
|
||||
Namespace: "XDPoS",
|
||||
Version: "1.0",
|
||||
Service: &API{chain: chain, XDPoS: x},
|
||||
}}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -693,7 +693,6 @@ func CalcDifficulty(snap *Snapshot, signer common.Address) *big.Int {
|
|||
func (c *Clique) APIs(chain consensus.ChainReader) []rpc.API {
|
||||
return []rpc.API{{
|
||||
Namespace: "clique",
|
||||
Version: "1.0",
|
||||
Service: &API{chain: chain, clique: c},
|
||||
}}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -400,39 +400,30 @@ func (e *Ethereum) APIs() []rpc.API {
|
|||
return append(apis, []rpc.API{
|
||||
{
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
Service: NewPublicEthereumAPI(e),
|
||||
}, {
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
Service: NewPublicMinerAPI(e),
|
||||
}, {
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
Service: downloader.NewPublicDownloaderAPI(e.protocolManager.downloader, e.eventMux),
|
||||
}, {
|
||||
Namespace: "miner",
|
||||
Version: "1.0",
|
||||
Service: NewPrivateMinerAPI(e),
|
||||
}, {
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
Service: filters.NewFilterAPI(filters.NewFilterSystem(e.ApiBackend, filters.Config{LogCacheSize: e.config.FilterLogCacheSize}), false),
|
||||
}, {
|
||||
Namespace: "admin",
|
||||
Version: "1.0",
|
||||
Service: NewPrivateAdminAPI(e),
|
||||
}, {
|
||||
Namespace: "debug",
|
||||
Version: "1.0",
|
||||
Service: NewPublicDebugAPI(e),
|
||||
}, {
|
||||
Namespace: "debug",
|
||||
Version: "1.0",
|
||||
Service: NewPrivateDebugAPI(e.chainConfig, e),
|
||||
}, {
|
||||
Namespace: "net",
|
||||
Version: "1.0",
|
||||
Service: e.netRPCService,
|
||||
},
|
||||
}...)
|
||||
|
|
|
|||
|
|
@ -124,39 +124,30 @@ func GetAPIs(apiBackend Backend, chainReader consensus.ChainReader) []rpc.API {
|
|||
return []rpc.API{
|
||||
{
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
Service: NewPublicEthereumAPI(apiBackend),
|
||||
}, {
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
Service: NewPublicBlockChainAPI(apiBackend, chainReader),
|
||||
}, {
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
Service: NewPublicTransactionPoolAPI(apiBackend, nonceLock),
|
||||
}, {
|
||||
Namespace: "XDCx",
|
||||
Version: "1.0",
|
||||
Service: NewPublicXDCXTransactionPoolAPI(apiBackend, nonceLock),
|
||||
}, {
|
||||
Namespace: "txpool",
|
||||
Version: "1.0",
|
||||
Service: NewPublicTxPoolAPI(apiBackend),
|
||||
}, {
|
||||
Namespace: "debug",
|
||||
Version: "1.0",
|
||||
Service: NewPublicDebugAPI(apiBackend),
|
||||
}, {
|
||||
Namespace: "debug",
|
||||
Version: "1.0",
|
||||
Service: NewPrivateDebugAPI(apiBackend),
|
||||
}, {
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
Service: NewPublicAccountAPI(apiBackend.AccountManager()),
|
||||
}, {
|
||||
Namespace: "personal",
|
||||
Version: "1.0",
|
||||
Service: NewPrivateAccountAPI(apiBackend, nonceLock),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,19 +34,15 @@ func (n *Node) apis() []rpc.API {
|
|||
return []rpc.API{
|
||||
{
|
||||
Namespace: "admin",
|
||||
Version: "1.0",
|
||||
Service: &privateAdminAPI{n},
|
||||
}, {
|
||||
Namespace: "admin",
|
||||
Version: "1.0",
|
||||
Service: &publicAdminAPI{n},
|
||||
}, {
|
||||
Namespace: "debug",
|
||||
Version: "1.0",
|
||||
Service: debug.Handler,
|
||||
}, {
|
||||
Namespace: "web3",
|
||||
Version: "1.0",
|
||||
Service: &publicWeb3API{n},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -452,7 +452,6 @@ func execP2PNode() {
|
|||
// Add the snapshot API.
|
||||
stack.RegisterAPIs([]rpc.API{{
|
||||
Namespace: "simulation",
|
||||
Version: "1.0",
|
||||
Service: SnapshotAPI{services},
|
||||
}})
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import (
|
|||
// API describes the set of methods offered over the RPC interface
|
||||
type API struct {
|
||||
Namespace string // namespace under which the rpc methods of Service are exposed
|
||||
Version string // api version for DApp's
|
||||
Version string // deprecated - this field is no longer used, but retained for compatibility
|
||||
Service interface{} // receiver instance which holds the methods
|
||||
Public bool // deprecated - this field is no longer used, but retained for compatibility
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue