Skip to content

Commit

Permalink
fixes block template serialization (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
HammerPavel authored Jan 5, 2025
1 parent 1d14120 commit 950c3ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/monero/daemon/MoneroDaemonRpc.java
Original file line number Diff line number Diff line change
Expand Up @@ -1113,9 +1113,8 @@ private static MoneroBlockTemplate convertRpcBlockTemplate(Map<String, Object> r
MoneroBlockTemplate template = new MoneroBlockTemplate();
for (String key : rpcTemplate.keySet()) {
Object val = rpcTemplate.get(key);
if (key.equals("blockhashing_blob")) template.setBlockTemplateBlob((String) val);
else if (key.equals("blocktemplate_blob")) template.setBlockHashingBlob((String) val);
else if (key.equals("difficulty")) template.setDifficulty((BigInteger) val);
if (key.equals("blockhashing_blob")) template.setBlockHashingBlob((String) val);
else if (key.equals("blocktemplate_blob")) template.setBlockTemplateBlob((String) val);
else if (key.equals("expected_reward")) template.setExpectedReward((BigInteger) val);
else if (key.equals("difficulty")) { } // handled by wide_difficulty
else if (key.equals("difficulty_top64")) { } // handled by wide_difficulty
Expand Down

0 comments on commit 950c3ed

Please sign in to comment.