From 16a5e1d64b604930d25490504bcc2a60218816c2 Mon Sep 17 00:00:00 2001
From: Ross Nicoll
The serialization is fixed and provides a hard guarantee about the encoded size, - * SIZE <= 10 + ceil(32.25*N) where N represents the number of leaf nodes of the partial tree. N itself + * SIZE <= 10 + ceil(32.25*N) where N represents the number of leaf nodes of the partial tree. N itself * is bounded by:
* *
- * N <= total_transactions
- * N <= 1 + matched_transactions*tree_height
+ * N <= total_transactions
+ * N <= 1 + matched_transactions*tree_height
*
The serialization format: * - uint32 total_transactions (4 bytes) * - varint number of hashes (1-3 bytes) - * - uint256[] hashes in depth-first order (<= 32*N bytes) + * - uint256[] hashes in depth-first order (<= 32*N bytes) * - varint number of bytes of flag bits (1-3 bytes) - * - byte[] flag bits, packed per 8 in a byte, least significant bit first (<= 2*N-1 bits) + * - byte[] flag bits, packed per 8 in a byte, least significant bit first (<= 2*N-1 bits) * The size constraints follow from this.*/ public class PartialMerkleTree extends Message { diff --git a/core/src/main/java/org/bitcoinj/core/Transaction.java b/core/src/main/java/org/bitcoinj/core/Transaction.java index b9e349a0..f04945fe 100644 --- a/core/src/main/java/org/bitcoinj/core/Transaction.java +++ b/core/src/main/java/org/bitcoinj/core/Transaction.java @@ -215,7 +215,7 @@ public class Transaction extends ChildMessage { } /** - * Creates a transaction by reading payload starting from offset bytes in. Length of a transaction is fixed. + * Creates a transaction by reading payload. Length of a transaction is fixed. */ public Transaction(NetworkParameters params, byte[] payload, @Nullable Message parent, boolean parseLazy, boolean parseRetain, int length) throws ProtocolException {