Skip to content

Commit dd1a32c

Browse files
committed
rpc: trivial eth_accounts implementation
1 parent 2ee9f8f commit dd1a32c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tests/trinity/core/json-rpc/test_ipc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ async def get_ipc_response(
8585
build_request('notamethod'),
8686
{'error': "Invalid RPC method: 'notamethod'", 'id': 3, 'jsonrpc': '2.0'},
8787
),
88+
(
89+
build_request('eth_accounts'),
90+
{'result': [], 'id': 3, 'jsonrpc': '2.0'},
91+
),
8892
(
8993
build_request('eth_mining'),
9094
{'result': False, 'id': 3, 'jsonrpc': '2.0'},

trinity/rpc/modules/eth.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ class Eth(RPCModule):
125125
Any attribute without an underscore is publicly accessible.
126126
'''
127127

128-
def accounts(self) -> None:
129-
raise NotImplementedError()
128+
def accounts(self) -> List[str]:
129+
# trinity does not manage accounts for the user
130+
return []
130131

131132
def blockNumber(self) -> str:
132133
num = self._chain.get_canonical_head().block_number

0 commit comments

Comments
 (0)