Skip to content

Commit

Permalink
Merge pull request #213 from cherry1603/develop
Browse files Browse the repository at this point in the history
fix miner address displayed in the RPC
  • Loading branch information
LucasMLK authored Apr 9, 2023
2 parents 7076a5a + 5eed030 commit 4734086
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 4734086

Please sign in to comment.