Skip to content

Commit 05b03d9

Browse files
committed
修复netparam参数
1 parent 31ec3ec commit 05b03d9

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

Diff for: src/main/java/org/consenlabs/tokencore/wallet/network/BitcoinCashMainNetParams.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ private BitcoinCashMainNetParams() {
2020
this.interval = 2016;
2121
this.targetTimespan = 1209600;
2222
this.maxTarget = Utils.decodeCompactBits(486604799L);
23-
this.dumpedPrivateKeyHeader = 176;
23+
this.dumpedPrivateKeyHeader = 128;
2424
this.addressHeader = 0;
25-
this.p2shHeader = 16;
25+
this.p2shHeader = 5;
2626
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
2727
this.port = 8333;
2828
this.packetMagic = 4190024921L;

Diff for: src/main/java/org/consenlabs/tokencore/wallet/network/BitcoinSvMainNetParams.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ private BitcoinSvMainNetParams() {
2020
this.interval = 2016;
2121
this.targetTimespan = 1209600;
2222
this.maxTarget = Utils.decodeCompactBits(486604799L);
23-
this.dumpedPrivateKeyHeader = 176;
23+
this.dumpedPrivateKeyHeader = 128;
2424
this.addressHeader = 0;
25-
this.p2shHeader = 16;
25+
this.p2shHeader = 5;
2626
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
2727
this.port = 8333;
2828
this.packetMagic = 4190024921L;

Diff for: src/main/java/org/consenlabs/tokencore/wallet/network/DashMainNetParams.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private DashMainNetParams() {
2020
this.interval = 2016;
2121
this.targetTimespan = 1209600;
2222
this.maxTarget = Utils.decodeCompactBits(486604799L);
23-
this.dumpedPrivateKeyHeader = 176;
23+
this.dumpedPrivateKeyHeader = 204;
2424
this.addressHeader = 76;
2525
this.p2shHeader = 16;
2626
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};

Diff for: src/main/java/org/consenlabs/tokencore/wallet/network/DogecoinMainNetParams.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ private DogecoinMainNetParams() {
2020
this.interval = 2016;
2121
this.targetTimespan = 1209600;
2222
this.maxTarget = Utils.decodeCompactBits(486604799L);
23-
this.dumpedPrivateKeyHeader = 176;
23+
this.dumpedPrivateKeyHeader = 158;
2424
this.addressHeader = 30;
25-
this.p2shHeader = 16;
25+
this.p2shHeader = 22;
2626
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
2727
this.port = 8333;
2828
this.packetMagic = 4190024921L;

Diff for: src/main/java/org/consenlabs/tokencore/wallet/network/LitecoinMainNetParams.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public class LitecoinMainNetParams extends AbstractBitcoinNetParams {
1313
public static final int MAINNET_MAJORITY_WINDOW = 1000;
1414
public static final int MAINNET_MAJORITY_REJECT_BLOCK_OUTDATED = 950;
1515
public static final int MAINNET_MAJORITY_ENFORCE_BLOCK_UPGRADE = 750;
16+
public static final int ADDRESS_HEADER_2 = 50;
17+
1618
private static LitecoinMainNetParams instance;
1719

1820
private LitecoinMainNetParams() {
@@ -22,7 +24,7 @@ private LitecoinMainNetParams() {
2224
this.dumpedPrivateKeyHeader = 176;
2325
this.addressHeader = 48;
2426
this.p2shHeader = 5;
25-
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
27+
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader, ADDRESS_HEADER_2};
2628
this.port = 8333;
2729
this.packetMagic = 4190024921L;
2830
this.bip32HeaderPub = 76067358;
@@ -59,4 +61,4 @@ public static synchronized LitecoinMainNetParams get() {
5961
public String getPaymentProtocolId() {
6062
return "main";
6163
}
62-
}
64+
}

0 commit comments

Comments
 (0)