handle wif format private keys with uncompressed pubkeys

This commit is contained in:
Craig Raw 2022-02-03 12:43:14 +02:00
parent 9618c73c50
commit ee732fb223
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ public class DumpedPrivateKey extends VersionedChecksummedBytes {
* Returns an ECKey created from this encoded private key. * Returns an ECKey created from this encoded private key.
*/ */
public ECKey getKey() { public ECKey getKey() {
return ECKey.fromPrivate(bytes); return ECKey.fromPrivate(bytes, compressed);
} }
@Override @Override

View file

@ -99,7 +99,7 @@ public class TransactionSignature {
} }
public static TransactionSignature decodeFromBitcoin(byte[] bytes, boolean requireCanonicalEncoding) throws SignatureDecodeException { public static TransactionSignature decodeFromBitcoin(byte[] bytes, boolean requireCanonicalEncoding) throws SignatureDecodeException {
if(bytes.length == 64 || bytes.length == 65) { if(bytes.length == 64) {
return decodeFromBitcoin(Type.SCHNORR, bytes, requireCanonicalEncoding); return decodeFromBitcoin(Type.SCHNORR, bytes, requireCanonicalEncoding);
} }