From 9b1edf00bd746b37f6db7c7b8c6e8025e10b0126 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Mon, 11 Feb 2013 20:31:14 +0100 Subject: [PATCH] Clarify the getDifficultyTarget() javadoc. --- core/src/main/java/com/google/bitcoin/core/Block.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/google/bitcoin/core/Block.java b/core/src/main/java/com/google/bitcoin/core/Block.java index 4dcb7b0a..a582ee51 100644 --- a/core/src/main/java/com/google/bitcoin/core/Block.java +++ b/core/src/main/java/com/google/bitcoin/core/Block.java @@ -853,9 +853,13 @@ public class Block extends Message { } /** - * Returns the difficulty of the proof of work that this block should meet encoded in compact form. The {@link + * Returns the difficulty of the proof of work that this block should meet encoded in compact form. The {@link * BlockChain} verifies that this is not too easy by looking at the length of the chain when the block is added. - * To find the actual value the hash should be compared against, use getDifficultyTargetBI. + * To find the actual value the hash should be compared against, use + * {@link com.google.bitcoin.core.Block#getDifficultyTargetAsInteger()}. Note that this is not the same as + * the difficulty value reported by the Bitcoin "getdifficulty" RPC that you may see on various block explorers. + * That number is the result of applying a formula to the underlying difficulty to normalize the minimum to 1. + * Calculating the difficulty that way is currently unsupported. */ public long getDifficultyTarget() { maybeParseHeader();