mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-18 21:25:49 +00:00
ScriptPattern: Get rid of redundant BaseEncoding instance.
This commit is contained in:
parent
029d096d8a
commit
0004ea4c35
@ -20,8 +20,7 @@ package org.bitcoinj.script;
|
|||||||
import org.bitcoinj.core.LegacyAddress;
|
import org.bitcoinj.core.LegacyAddress;
|
||||||
import org.bitcoinj.core.SegwitAddress;
|
import org.bitcoinj.core.SegwitAddress;
|
||||||
import org.bitcoinj.core.Sha256Hash;
|
import org.bitcoinj.core.Sha256Hash;
|
||||||
|
import org.bitcoinj.core.Utils;
|
||||||
import com.google.common.io.BaseEncoding;
|
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -279,8 +278,7 @@ public class ScriptPattern {
|
|||||||
return chunks.size() > 0 && chunks.get(0).equalsOpCode(ScriptOpCodes.OP_RETURN);
|
return chunks.size() > 0 && chunks.get(0).equalsOpCode(ScriptOpCodes.OP_RETURN);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final BaseEncoding HEX = BaseEncoding.base16().lowerCase();
|
private static final byte[] SEGWIT_COMMITMENT_HEADER = Utils.HEX.decode("aa21a9ed");
|
||||||
private static final byte[] SEGWIT_COMMITMENT_HEADER = HEX.decode("aa21a9ed");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this script matches the pattern for a segwit commitment (in an output of the coinbase
|
* Returns whether this script matches the pattern for a segwit commitment (in an output of the coinbase
|
||||||
|
Loading…
x
Reference in New Issue
Block a user