Skip to content

Commit

Permalink
Message: remove references to deprecated bitcoinSerialize()
Browse files Browse the repository at this point in the history
  • Loading branch information
schildbach committed Sep 2, 2024
1 parent 8d1a2cc commit 7eee141
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/core/BaseMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public final byte[] serialize() {
}

/**
* Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
* Serializes this message to the provided stream. If you just want the raw bytes use {@link #serialize()}.
*/
protected abstract void bitcoinSerializeToStream(OutputStream stream) throws IOException;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/core/BloomFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public String toString() {
}

/**
* Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
* Serializes this message to the provided stream. If you just want the raw bytes use {@link #serialize()}.
*/
@Override
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/wallet/Wallet.java
Original file line number Diff line number Diff line change
Expand Up @@ -5350,7 +5350,7 @@ private FeeCalculation calculateFee(SendRequest req, Coin value, boolean needAtL

private void addSuppliedInputs(Transaction tx, List<TransactionInput> originalInputs) {
for (TransactionInput input : originalInputs)
tx.addInput(TransactionInput.read(ByteBuffer.wrap(input.bitcoinSerialize()), tx));
tx.addInput(TransactionInput.read(ByteBuffer.wrap(input.serialize()), tx));
}

private Coin estimateFees(Transaction tx, CoinSelection coinSelection, Coin requestedFeePerKb, boolean ensureMinRequiredFee) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ public boolean add(Rule element) {
// This check fails because it was created for "retain mode" and the likely encoding is not "optimal".
// We since removed this capability retain the original encoding, but could not rewrite this test data.
// checkState(stream.size() == b64.getMessageSize());
// checkState(Arrays.equals(stream.toByteArray(), b64.bitcoinSerialize()));
// checkState(Arrays.equals(stream.toByteArray(), b64.serialize()));
// checkState(b64.getOptimalEncodingMessageSize() == b64Original.block.getMessageSize());
}
blocks.add(new BlockAndValidity(b64, true, false, b64.getHash(), chainHeadHeight + 19, "b64"));
Expand Down

0 comments on commit 7eee141

Please sign in to comment.