本文整理了Java中io.nuls.kernel.model.Transaction.getBlockHeight()
方法的一些代码示例,展示了Transaction.getBlockHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transaction.getBlockHeight()
方法的具体详情如下:
包路径:io.nuls.kernel.model.Transaction
类名称:Transaction
方法名:getBlockHeight
暂无
代码示例来源:origin: nuls-io/nuls
public TransactionInfoPo(Transaction tx) {
if (tx == null) {
return;
}
this.txHash = tx.getHash();
this.blockHeight = tx.getBlockHeight();
this.time = tx.getTime();
List<byte[]> addressList = tx.getAllRelativeAddress();
byte[] addresses = new byte[addressList.size() * Address.ADDRESS_LENGTH];
for (int i = 0; i < addressList.size(); i++) {
System.arraycopy(addressList.get(i), 0, addresses, Address.ADDRESS_LENGTH* i, Address.ADDRESS_LENGTH);
}
this.addresses = addresses;
this.txType = tx.getType();
}
代码示例来源:origin: nuls-io/nuls
public TransactionInfoPo(Transaction tx) {
if (tx == null) {
return;
}
this.txHash = tx.getHash();
this.blockHeight = tx.getBlockHeight();
this.time = tx.getTime();
List<byte[]> addressList = tx.getAllRelativeAddress();
byte[] addresses = new byte[addressList.size() * Address.ADDRESS_LENGTH];
for (int i = 0; i < addressList.size(); i++) {
System.arraycopy(addressList.get(i), 0, addresses, Address.ADDRESS_LENGTH * i, Address.ADDRESS_LENGTH);
}
this.addresses = addresses;
this.txType = tx.getType();
}
代码示例来源:origin: nuls-io/nuls
@GET
@Path("/bytes")
@Produces(MediaType.APPLICATION_JSON)
public RpcClientResult getTxBytes(@QueryParam("hash") String hash) throws IOException {
Result result;
if (!NulsDigestData.validHash(hash)) {
return Result.getFailed(KernelErrorCode.PARAMETER_ERROR).toRpcClientResult();
}
Transaction tx = null;
try {
tx = ledgerService.getTx(NulsDigestData.fromDigestHex(hash));
} catch (NulsException e) {
Log.error(e);
}
if (tx == null) {
result = Result.getFailed(TransactionErrorCode.TX_NOT_EXIST);
} else {
result = Result.getSuccess();
Map<String, String> map = new HashMap<>();
map.put("value", Base64.getEncoder().encodeToString(tx.serialize()));
map.put("height", tx.getBlockHeight() + "");
result.setData(map);
}
return result.toRpcClientResult();
}
}
代码示例来源:origin: nuls-io/nuls
continue;
info.setBlockHeight(tx.getBlockHeight());
代码示例来源:origin: nuls-io/nuls
Transaction localTx = ledgerService.getTx(tx.getHash());
if (null == localTx || tx.getBlockHeight() != localTx.getBlockHeight()) {
continue;
代码示例来源:origin: nuls-io/nuls
this.type = tx.getType();
this.time = tx.getTime();
this.blockHeight = tx.getBlockHeight();
this.fee = tx.getFee().getValue();
this.size = tx.getSize();
代码示例来源:origin: nuls-io/nuls
this.type = tx.getType();
this.time = tx.getTime();
this.blockHeight = tx.getBlockHeight();
this.fee = tx.getFee().getValue();
this.size = tx.getSize();
代码示例来源:origin: nuls-io/nuls
this.type = tx.getType();
this.time = tx.getTime();
this.blockHeight = tx.getBlockHeight();
this.fee = tx.getFee().getValue();
this.size = tx.getSize();
代码示例来源:origin: nuls-io/nuls
this.type = tx.getType();
this.time = tx.getTime();
this.blockHeight = tx.getBlockHeight();
this.fee = tx.getFee().getValue();
this.size = tx.getSize();
代码示例来源:origin: nuls-io/nuls
balance.setBlockHeight(tx.getBlockHeight());
balance.setTxIndex(txIndex);
代码示例来源:origin: nuls-io/nuls
tokenTransferInfoPo.setDecimals(contractAddressInfo.getDecimals());
tokenTransferInfoPo.setTime(tx.getTime());
tokenTransferInfoPo.setBlockHeight(tx.getBlockHeight());
txHashBytes = tx.getHash().serialize();
tokenTransferInfoPo.setTxHash(txHashBytes);
内容来源于网络,如有侵权,请联系作者删除!