当前位置: 首页>>代码示例>>Java>>正文


Java ByteUtil.toHexString方法代码示例

本文整理汇总了Java中org.ethereum.util.ByteUtil.toHexString方法的典型用法代码示例。如果您正苦于以下问题:Java ByteUtil.toHexString方法的具体用法?Java ByteUtil.toHexString怎么用?Java ByteUtil.toHexString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ethereum.util.ByteUtil的用法示例。


在下文中一共展示了ByteUtil.toHexString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    return "NodeStat[reput: " + getReputation() + "(" + savedReputation + "), discover: " +
            discoverInPong + "/" + discoverOutPing + " " +
            discoverOutPong + "/" + discoverInPing + " " +
            discoverInNeighbours + "/" + discoverOutFind + " " +
            discoverOutNeighbours + "/" + discoverInFind + " " +
            ", rlpx: " + rlpxHandshake + "/" + rlpxAuthMessagesSent + "/" + rlpxConnectionAttempts + " " +
            rlpxInMessages + "/" + rlpxOutMessages +
            ", eth: " + ethHandshake + "/" + ethInbound + "/" + ethOutbound + " " +
            (ethLastInboundStatusMsg != null ? ByteUtil.toHexString(ethLastInboundStatusMsg.getTotalDifficulty()) : "-") + " " +
            (disconnected ? "X " : "") +
            (rlpxLastLocalDisconnectReason != null ? ("<=" + rlpxLastLocalDisconnectReason) : " ") +
            (rlpxLastRemoteDisconnectReason != null ? ("=>" + rlpxLastRemoteDisconnectReason) : " ")  +
            "[" + clientId + "]";
}
 
开发者ID:rsksmart,项目名称:rskj,代码行数:17,代码来源:NodeStatistics.java

示例2: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    if (!parsed) {
        rlpParse();
    }

    return "TransactionData [" + "hash=" + ByteUtil.toHexString(hash) +
            "  nonce=" + ByteUtil.toHexString(nonce) +
            ", gasPrice=" + ByteUtil.toHexString(gasPrice) +
            ", gas=" + ByteUtil.toHexString(gasLimit) +
            ", receiveAddress=" + receiveAddress.toString() +
            ", value=" + ByteUtil.toHexString(value) +
            ", data=" + ByteUtil.toHexString(data) +
            ", signatureV=" + (signature == null ? "" : signature.v) +
            ", signatureR=" + (signature == null ? "" : ByteUtil.toHexString(BigIntegers.asUnsignedByteArray(signature.r))) +
            ", signatureS=" + (signature == null ? "" : ByteUtil.toHexString(BigIntegers.asUnsignedByteArray(signature.s))) +
            "]";
}
 
开发者ID:rsksmart,项目名称:rskj,代码行数:19,代码来源:Transaction.java

示例3: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    return "NodeStat[reput: " + getReputation() + "(" + persistedReputation + "), discover: " +
            discoverInPong + "/" + discoverOutPing + " " +
            discoverOutPong + "/" + discoverInPing + " " +
            discoverInNeighbours + "/" + discoverOutFind + " " +
            discoverOutNeighbours + "/" + discoverInFind + " " +
            ((int)discoverMessageLatency.getAvrg()) + "ms" +
            ", rlpx: " + rlpxHandshake + "/" + rlpxAuthMessagesSent + "/" + rlpxConnectionAttempts + " " +
            rlpxInMessages + "/" + rlpxOutMessages +
            ", eth: " + ethHandshake + "/" + ethInbound + "/" + ethOutbound + " " +
            (ethLastInboundStatusMsg != null ? ByteUtil.toHexString(ethLastInboundStatusMsg.getTotalDifficulty()) : "-") + " " +
            (wasDisconnected() ? "X " : "") +
            (rlpxLastLocalDisconnectReason != null ? ("<=" + rlpxLastLocalDisconnectReason) : " ") +
            (rlpxLastRemoteDisconnectReason != null ? ("=>" + rlpxLastRemoteDisconnectReason) : " ")  +
            "[" + clientId + "]";
}
 
开发者ID:Aptoide,项目名称:AppCoins-ethereumj,代码行数:18,代码来源:NodeStatistics.java

示例4: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
public String toString(int maxDataSize) {
    rlpParse();
    String dataS;
    if (data == null) {
        dataS = "";
    } else if (data.length < maxDataSize) {
        dataS = ByteUtil.toHexString(data);
    } else {
        dataS = ByteUtil.toHexString(Arrays.copyOfRange(data, 0, maxDataSize)) +
                "... (" + data.length + " bytes)";
    }
    return "TransactionData [" + "hash=" + ByteUtil.toHexString(hash) +
            "  nonce=" + ByteUtil.toHexString(nonce) +
            ", gasPrice=" + ByteUtil.toHexString(gasPrice) +
            ", gas=" + ByteUtil.toHexString(gasLimit) +
            ", receiveAddress=" + ByteUtil.toHexString(receiveAddress) +
            ", sendAddress=" + ByteUtil.toHexString(getSender())  +
            ", value=" + ByteUtil.toHexString(value) +
            ", data=" + dataS +
            ", signatureV=" + (signature == null ? "" : signature.v) +
            ", signatureR=" + (signature == null ? "" : ByteUtil.toHexString(BigIntegers.asUnsignedByteArray(signature.r))) +
            ", signatureS=" + (signature == null ? "" : ByteUtil.toHexString(BigIntegers.asUnsignedByteArray(signature.s))) +
            "]";
}
 
开发者ID:Aptoide,项目名称:AppCoins-ethereumj,代码行数:25,代码来源:Transaction.java

示例5: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    if (!parsed) {
        parse();
    }
    
    return "[" + getMessageType() +
            " blockNumber=" + String.valueOf(blockNumber) +
            " blockHash=" + ByteUtil.toHexString(blockHash) +
            " maxHeaders=" + maxHeaders +
            " skipBlocks=" + skipBlocks +
            " reverse=" + reverse + "]";
}
 
开发者ID:rsksmart,项目名称:rskj,代码行数:14,代码来源:GetBlockHeadersMessage.java

示例6: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    if (!parsed) {
        parse();
    }
    return "[" + this.getCommand().name() +
            " protocolVersion=" + this.protocolVersion +
            " networkId=" + this.networkId +
            " totalDifficulty=" + ByteUtil.toHexString(this.totalDifficulty) +
            " bestHash=" + Hex.toHexString(this.bestHash) +
            " genesisHash=" + Hex.toHexString(this.genesisHash) +
            "]";
}
 
开发者ID:rsksmart,项目名称:rskj,代码行数:14,代码来源:StatusMessage.java

示例7: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    if (!parsed) {
        parse();
    }
    return "[" + this.getCommand().name() +
            " blockNumber=" + String.valueOf(blockNumber) +
            " blockHash=" + ByteUtil.toHexString(blockHash) +
            " maxHeaders=" + maxHeaders +
            " skipBlocks=" + skipBlocks +
            " reverse=" + reverse + "]";
}
 
开发者ID:rsksmart,项目名称:rskj,代码行数:13,代码来源:GetBlockHeadersMessage.java

示例8: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    parse();
    return "[" + this.getCommand().name() +
            " protocolVersion=" + this.protocolVersion +
            " networkId=" + this.networkId +
            " totalDifficulty=" + ByteUtil.toHexString(this.totalDifficulty) +
            " bestHash=" + Hex.toHexString(this.bestHash) +
            " genesisHash=" + Hex.toHexString(this.genesisHash) +
            "]";
}
 
开发者ID:Aptoide,项目名称:AppCoins-ethereumj,代码行数:12,代码来源:StatusMessage.java

示例9: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    parse();
    return "[" + this.getCommand().name() +
            " blockNumber=" + String.valueOf(blockNumber) +
            " blockHash=" + ByteUtil.toHexString(blockHash) +
            " maxHeaders=" + maxHeaders +
            " skipBlocks=" + skipBlocks +
            " reverse=" + reverse + "]";
}
 
开发者ID:Aptoide,项目名称:AppCoins-ethereumj,代码行数:11,代码来源:GetBlockHeadersMessage.java

示例10: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    String dataString = ByteUtil.toHexString(
            Arrays.copyOfRange(getData(), getDataOffset(), getDataOffset() + 16)) + "...";
    return "TreeChunk[" + getSubtreeSize() + ", " + getKey() + ", " + dataString + "]";
}
 
开发者ID:Aptoide,项目名称:AppCoins-ethereumj,代码行数:7,代码来源:TreeChunker.java

示例11: toString

import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
    return getBytes() == null ? "<null>" : ByteUtil.toHexString(getBytes());
}
 
开发者ID:Aptoide,项目名称:AppCoins-ethereumj,代码行数:5,代码来源:Key.java


注:本文中的org.ethereum.util.ByteUtil.toHexString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。