Skip to content

Commit

Permalink
fix miner address displayed in the RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
cherry1603 committed Apr 9, 2023
1 parent 7076a5a commit 5eed030
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;

import io.xdag.utils.PubkeyAddressUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.tuweni.bytes.Bytes32;
import org.apache.tuweni.bytes.MutableBytes32;
Expand Down Expand Up @@ -285,7 +287,7 @@ public String xdag_getMaxXferBalance() throws Exception {
}

private PoolWorkerDTO getPoolWorkerDTO(PoolWorkerDTO.PoolWorkerDTOBuilder poolWorkerDTOBuilder,Miner miner){
poolWorkerDTOBuilder.address(BasicUtils.hash2Address(miner.getAddressHash()))
poolWorkerDTOBuilder.address(PubkeyAddressUtils.toBase58(miner.getAddressHashByte()))
.status(miner.getMinerStates().toString())
.unpaidShares(MinerCalculate.calculateUnpaidShares(miner))
.hashrate(BasicUtils.xdag_log_difficulty2hashrate(miner.getMeanLogDiff()))
Expand Down

0 comments on commit 5eed030

Please sign in to comment.