ECKey: Remove unused FAKE_SIGNATURES static boolean
@@ -21,7 +21,6 @@ package org.bitcoinj.core;
import org.bitcoinj.crypto.*;
import org.bitcoinj.script.Script;
-import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
import com.google.common.primitives.UnsignedBytes;
@@ -619,14 +618,6 @@ public class ECKey implements EncryptableItem {
return sign(input, null);
}
- /**
- * If this global variable is set to true, sign() creates a dummy signature and verify() always returns true.
- * This is intended to help accelerate unit tests that do a lot of signing/verifying, which in the debugger
- * can be painfully slow.
- */
- @VisibleForTesting
- public static boolean FAKE_SIGNATURES = false;
-
/**
* Signs the given hash and returns the R and S components as BigIntegers. In the Bitcoin protocol, they are
* usually encoded using DER format, so you want {@link ECKey.ECDSASignature#encodeToDER()}
@@ -666,8 +657,6 @@ public class ECKey implements EncryptableItem {
throw new RuntimeException(e); // cannot happen
}
}
- if (FAKE_SIGNATURES)
- return TransactionSignature.dummy();
checkNotNull(privateKeyForSigning);
ECDSASigner signer = new ECDSASigner(new HMacDSAKCalculator(new SHA256Digest()));
ECPrivateKeyParameters privKey = new ECPrivateKeyParameters(privateKeyForSigning, CURVE);
@@ -687,9 +676,6 @@ public class ECKey implements EncryptableItem {
* @param pub The public key bytes to use.
*/
public static boolean verify(byte[] data, ECDSASignature signature, byte[] pub) {
- if (FAKE_SIGNATURES)
- return true;
-
if (Secp256k1Context.isEnabled()) {
try {
return NativeSecp256k1.verify(data, signature.encodeToDER(), pub);
