org.bitcoinj.core.Utils.int64ToByteStreamLE()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中org.bitcoinj.core.Utils.int64ToByteStreamLE()方法的一些代码示例,展示了Utils.int64ToByteStreamLE()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.int64ToByteStreamLE()方法的具体详情如下:
包路径:org.bitcoinj.core.Utils
类名称:Utils
方法名:int64ToByteStreamLE

Utils.int64ToByteStreamLE介绍

暂无

代码示例

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

@Override
public void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  if (hasNonce)
    Utils.int64ToByteStreamLE(nonce, stream);
}

代码示例来源:origin: HashEngineering/dashj

@Override
public void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  if (hasNonce)
    Utils.int64ToByteStreamLE(nonce, stream);
}

代码示例来源:origin: fr.acinq/bitcoinj-core

@Override
public void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  if (hasNonce)
    Utils.int64ToByteStreamLE(nonce, stream);
}

代码示例来源:origin: greenaddress/GreenBits

@Override
public void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  if (hasNonce)
    Utils.int64ToByteStreamLE(nonce, stream);
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

@Override
public void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  Utils.int64ToByteStreamLE(nonce, stream);
}

代码示例来源:origin: greenaddress/GreenBits

@Override
public void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  Utils.int64ToByteStreamLE(nonce, stream);
}

代码示例来源:origin: HashEngineering/dashj

@Override
public void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  Utils.int64ToByteStreamLE(nonce, stream);
}

代码示例来源:origin: HashEngineering/dashj

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  Utils.uint32ToByteStreamLE(nSporkID, stream);
  Utils.int64ToByteStreamLE(nValue, stream);
  Utils.int64ToByteStreamLE(nTimeSigned, stream);
  sig.bitcoinSerialize(stream);
}

代码示例来源:origin: greenaddress/GreenBits

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  checkNotNull(scriptBytes);
  Utils.int64ToByteStreamLE(value, stream);
  // TODO: Move script serialization into the Script class, where it belongs.
  stream.write(new VarInt(scriptBytes.length).encode());
  stream.write(scriptBytes);
}

代码示例来源:origin: fr.acinq/bitcoinj-core

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  checkNotNull(scriptBytes);
  Utils.int64ToByteStreamLE(value, stream);
  // TODO: Move script serialization into the Script class, where it belongs.
  stream.write(new VarInt(scriptBytes.length).encode());
  stream.write(scriptBytes);
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  checkNotNull(scriptBytes);
  Utils.int64ToByteStreamLE(value, stream);
  // TODO: Move script serialization into the Script class, where it belongs.
  stream.write(new VarInt(scriptBytes.length).encode());
  stream.write(scriptBytes);
}

代码示例来源:origin: HashEngineering/dashj

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  checkNotNull(scriptBytes);
  Utils.int64ToByteStreamLE(value, stream);
  // TODO: Move script serialization into the Script class, where it belongs.
  stream.write(new VarInt(scriptBytes.length).encode());
  stream.write(scriptBytes);
}

代码示例来源:origin: HashEngineering/dashj

@Override
public Sha256Hash getHash()
{
  try {
    ByteArrayOutputStream bos = new UnsafeByteArrayOutputStream(HASH_SIZE);
    Utils.uint32ToByteStreamLE(nSporkID, bos);
    Utils.int64ToByteStreamLE(nValue, bos);
    Utils.int64ToByteStreamLE(nTimeSigned, bos);
    return Sha256Hash.wrapReversed(Sha256Hash.hashTwice(bos.toByteArray()));
  } catch (IOException e) {
    throw new RuntimeException(e); // Cannot happen.
  }
}

代码示例来源:origin: HashEngineering/dashj

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  vin.bitcoinSerialize(stream);
  stream.write(vchSig);
  int64ToByteStreamLE(sigTime, stream);
  stream.write(new VarInt(stop ? 1 : 0).encode());
}

代码示例来源:origin: HashEngineering/dashj

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  uint32ToByteStreamLE(denom, stream);
  vin.bitcoinSerialize(stream);
  int64ToByteStreamLE(time, stream);
  byte data [] = new byte[1];
  data[0] = (byte)(ready ? 1 : 0);
  stream.write(data);
  stream.write(new VarInt(vchSig.length).encode());
  stream.write(vchSig);
}

代码示例来源:origin: HashEngineering/dashj

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  vin.bitcoinSerialize(stream);
  stream.write(blockHash.getReversedBytes());
  int64ToByteStreamLE(sigTime, stream);
  vchSig.bitcoinSerialize(stream);
}

代码示例来源:origin: HashEngineering/dashj

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  uint32ToByteStreamLE(blockHeight, stream);
  int64ToByteStreamLE(score, stream);
  vin.bitcoinSerialize(stream);
  stream.write(new VarInt(vchSig.length).encode());
  stream.write(vchSig);
}

代码示例来源:origin: HashEngineering/dashj

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  //uint32ToByteStreamLE(version, stream);
  int64ToByteStreamLE(blockHeight, stream);
  //scrypt pubkey         //TODO: not finished
  byte [] scriptBytes = pubkey.getProgram();
  stream.write(new VarInt(scriptBytes.length).encode());
  stream.write(scriptBytes);
  //this.
  uint32ToByteStreamLE(votes, stream);
}

代码示例来源:origin: HashEngineering/dashj

@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
  vin.bitcoinSerialize(stream);
  address.bitcoinSerialize(stream);
  pubKeyCollateralAddress.bitcoinSerialize(stream);
  pubKeyMasternode.bitcoinSerialize(stream);
  sig.bitcoinSerialize(stream);
  Utils.int64ToByteStreamLE(sigTime, stream);
  Utils.uint32ToByteStreamLE(protocolVersion, stream);
  lastPing.bitcoinSerialize(stream);
  Utils.int64ToByteStreamLE(nLastDsq, stream);
}

代码示例来源:origin: HashEngineering/dashj

public Sha256Hash getHash(){
    try {
      UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream(vchSig.calculateMessageSizeInBytes()+8);
      vin.bitcoinSerialize(bos);
      Utils.int64ToByteStreamLE(sigTime, bos);
      return Sha256Hash.wrapReversed(Sha256Hash.hashTwice(bos.toByteArray()));
    } catch (IOException e) {
      throw new RuntimeException(e); // Cannot happen.
    }
  }
}

相关文章