diff options
Diffstat (limited to 'internal/ethapi/backend.go')
-rw-r--r-- | internal/ethapi/backend.go | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/internal/ethapi/backend.go b/internal/ethapi/backend.go index d112a6aef..0aa3da18d 100644 --- a/internal/ethapi/backend.go +++ b/internal/ethapi/backend.go @@ -22,7 +22,6 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/compiler" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" @@ -59,7 +58,7 @@ type Backend interface { GetPoolTransaction(txHash common.Hash) *types.Transaction GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error) Stats() (pending int, queued int) - TxPoolContent() (map[common.Address]map[uint64][]*types.Transaction, map[common.Address]map[uint64][]*types.Transaction) + TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions) } type State interface { @@ -69,12 +68,13 @@ type State interface { GetNonce(ctx context.Context, addr common.Address) (uint64, error) } -func GetAPIs(apiBackend Backend, solcPath *string, solc **compiler.Solidity) []rpc.API { - return []rpc.API{ +func GetAPIs(apiBackend Backend, solcPath string) []rpc.API { + compiler := makeCompilerAPIs(solcPath) + all := []rpc.API{ { Namespace: "eth", Version: "1.0", - Service: NewPublicEthereumAPI(apiBackend, solcPath, solc), + Service: NewPublicEthereumAPI(apiBackend), Public: true, }, { Namespace: "eth", @@ -92,10 +92,6 @@ func GetAPIs(apiBackend Backend, solcPath *string, solc **compiler.Solidity) []r Service: NewPublicTxPoolAPI(apiBackend), Public: true, }, { - Namespace: "admin", - Version: "1.0", - Service: NewPrivateAdminAPI(apiBackend, solcPath, solc), - }, { Namespace: "debug", Version: "1.0", Service: NewPublicDebugAPI(apiBackend), @@ -116,4 +112,5 @@ func GetAPIs(apiBackend Backend, solcPath *string, solc **compiler.Solidity) []r Public: false, }, } + return append(compiler, all...) } |