@Override public void bitcoinSerializeToStream(OutputStream stream) throws IOException { if (hasNonce) Utils.int64ToByteStreamLE(nonce, stream); }
@Override public void bitcoinSerializeToStream(OutputStream stream) throws IOException { if (hasNonce) Utils.int64ToByteStreamLE(nonce, stream); }
@Override public void bitcoinSerializeToStream(OutputStream stream) throws IOException { if (hasNonce) Utils.int64ToByteStreamLE(nonce, stream); }
@Override public void bitcoinSerializeToStream(OutputStream stream) throws IOException { if (hasNonce) Utils.int64ToByteStreamLE(nonce, stream); }
@Override public void bitcoinSerializeToStream(OutputStream stream) throws IOException { Utils.int64ToByteStreamLE(nonce, stream); }
@Override public void bitcoinSerializeToStream(OutputStream stream) throws IOException { Utils.int64ToByteStreamLE(nonce, stream); }
@Override public void bitcoinSerializeToStream(OutputStream stream) throws IOException { Utils.int64ToByteStreamLE(nonce, stream); }
@Override protected void bitcoinSerializeToStream(OutputStream stream) throws IOException { Utils.uint32ToByteStreamLE(nSporkID, stream); Utils.int64ToByteStreamLE(nValue, stream); Utils.int64ToByteStreamLE(nTimeSigned, stream); sig.bitcoinSerialize(stream); }
@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); }
@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); }
@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); }
@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); }
@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. } }
@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()); }
@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); }
@Override protected void bitcoinSerializeToStream(OutputStream stream) throws IOException { vin.bitcoinSerialize(stream); stream.write(blockHash.getReversedBytes()); int64ToByteStreamLE(sigTime, stream); vchSig.bitcoinSerialize(stream); }
@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); }
@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); }
@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); }
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. } } }