Skip to content

Commit

Permalink
removed implementation of eth_getWork on server-side
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-sharif committed Mar 2, 2018
1 parent 4f0644f commit 0dbd683
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modApiServer/src/org/aion/api/server/IRpc.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ enum Method {
eth_getTransactionByHash,
eth_getTransactionReceipt,
eth_getTransactionCount,
eth_getWork,
//eth_getWork,
eth_estimateGas,
eth_sendTransaction,
eth_sendRawTransaction,
Expand Down
7 changes: 5 additions & 2 deletions modApiServer/src/org/aion/api/server/http/HttpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,13 @@ private static JSONObject process(final IRpc.Method _method, final long _id, fin
case eth_getBalance:
String address = params.get(0) + "";
return processResult(_id, TypeConverter.toJsonHex(api.getBalance(address)));

/*
// rationale for not supporting this: does not make sense in the context of aion's getWork for minig.
// see functions under 'stratum pool' descriptor in IRpc.java for currenly-supported stratum interactions
case eth_getWork:
// Header without nonce and solution , pool needs add new nonce
return processResult(_id, toHexString(HashUtil.h256(api.getBestBlock().getHeader().getHeaderBytes(true))));
return processResult(_id, toHexString(HashUtil.h256(api.getBestBlock().getHeader().getHeaderBytes(true))));
*/
case eth_syncing:
SyncInfo syncInfo = api.getSync();
if (!syncInfo.done) {
Expand Down

0 comments on commit 0dbd683

Please sign in to comment.