Skip to content

Commit

Permalink
修复netparam参数
Browse files Browse the repository at this point in the history
  • Loading branch information
GalaxySciTech committed Sep 14, 2020
1 parent 31ec3ec commit 05b03d9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ private BitcoinCashMainNetParams() {
this.interval = 2016;
this.targetTimespan = 1209600;
this.maxTarget = Utils.decodeCompactBits(486604799L);
this.dumpedPrivateKeyHeader = 176;
this.dumpedPrivateKeyHeader = 128;
this.addressHeader = 0;
this.p2shHeader = 16;
this.p2shHeader = 5;
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
this.port = 8333;
this.packetMagic = 4190024921L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ private BitcoinSvMainNetParams() {
this.interval = 2016;
this.targetTimespan = 1209600;
this.maxTarget = Utils.decodeCompactBits(486604799L);
this.dumpedPrivateKeyHeader = 176;
this.dumpedPrivateKeyHeader = 128;
this.addressHeader = 0;
this.p2shHeader = 16;
this.p2shHeader = 5;
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
this.port = 8333;
this.packetMagic = 4190024921L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private DashMainNetParams() {
this.interval = 2016;
this.targetTimespan = 1209600;
this.maxTarget = Utils.decodeCompactBits(486604799L);
this.dumpedPrivateKeyHeader = 176;
this.dumpedPrivateKeyHeader = 204;
this.addressHeader = 76;
this.p2shHeader = 16;
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ private DogecoinMainNetParams() {
this.interval = 2016;
this.targetTimespan = 1209600;
this.maxTarget = Utils.decodeCompactBits(486604799L);
this.dumpedPrivateKeyHeader = 176;
this.dumpedPrivateKeyHeader = 158;
this.addressHeader = 30;
this.p2shHeader = 16;
this.p2shHeader = 22;
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
this.port = 8333;
this.packetMagic = 4190024921L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class LitecoinMainNetParams extends AbstractBitcoinNetParams {
public static final int MAINNET_MAJORITY_WINDOW = 1000;
public static final int MAINNET_MAJORITY_REJECT_BLOCK_OUTDATED = 950;
public static final int MAINNET_MAJORITY_ENFORCE_BLOCK_UPGRADE = 750;
public static final int ADDRESS_HEADER_2 = 50;

private static LitecoinMainNetParams instance;

private LitecoinMainNetParams() {
Expand All @@ -22,7 +24,7 @@ private LitecoinMainNetParams() {
this.dumpedPrivateKeyHeader = 176;
this.addressHeader = 48;
this.p2shHeader = 5;
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader, ADDRESS_HEADER_2};
this.port = 8333;
this.packetMagic = 4190024921L;
this.bip32HeaderPub = 76067358;
Expand Down Expand Up @@ -59,4 +61,4 @@ public static synchronized LitecoinMainNetParams get() {
public String getPaymentProtocolId() {
return "main";
}
}
}

0 comments on commit 05b03d9

Please sign in to comment.