本文整理汇总了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 + "]";
}
示例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))) +
"]";
}
示例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 + "]";
}
示例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))) +
"]";
}
示例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 + "]";
}
示例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) +
"]";
}
示例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 + "]";
}
示例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) +
"]";
}
示例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 + "]";
}
示例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 + "]";
}
示例11: toString
import org.ethereum.util.ByteUtil; //导入方法依赖的package包/类
@Override
public String toString() {
return getBytes() == null ? "<null>" : ByteUtil.toHexString(getBytes());
}