Skip to content

Commit

Permalink
Merge branch 'release-0.14' of https://github.com/bitcoinj-cash/bitcoinj
Browse files Browse the repository at this point in the history
 into release-0.14
  • Loading branch information
shadders committed Dec 5, 2017
2 parents 5e6c548 + 47adad3 commit 8fb98b4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/params/MainNetParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public MainNetParams() {
p2shHeader = 5;
acceptableAddressCodes = new int[] { addressHeader, p2shHeader };
port = 8333;
packetMagic = 0xf9beb4d9L;
packetMagic = 0xe3e1f3e8L;
bip32HeaderPub = 0x0488B21E; //The 4 byte header that serializes in base58 to "xpub".
bip32HeaderPriv = 0x0488ADE4; //The 4 byte header that serializes in base58 to "xprv"

Expand Down
4 changes: 3 additions & 1 deletion core/src/main/java/org/bitcoinj/params/TestNet2Params.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
/**
* Parameters for the old version 2 testnet. This is not useful to you - it exists only because some unit tests are
* based on it.
*
*
*/
public class TestNet2Params extends AbstractBitcoinNetParams {
public static final int TESTNET_MAJORITY_WINDOW = 100;
Expand All @@ -32,7 +34,7 @@ public class TestNet2Params extends AbstractBitcoinNetParams {
public TestNet2Params() {
super();
id = ID_TESTNET;
packetMagic = 0xfabfb5daL;
packetMagic = 0xdab5bffaL;
port = 18333;
addressHeader = 111;
p2shHeader = 196;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/params/TestNet3Params.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public TestNet3Params() {
super();
id = ID_TESTNET;
// Genesis hash is 000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
packetMagic = 0x0b110907;
packetMagic = 0xf4e5f3f4L;
interval = INTERVAL;
targetTimespan = TARGET_TIMESPAN;
maxTarget = Utils.decodeCompactBits(0x1d00ffffL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
import static org.junit.Assert.*;

public class BitcoinSerializerTest {
private static final byte[] ADDRESS_MESSAGE_BYTES = HEX.decode("f9beb4d96164647200000000000000001f000000" +
private static final byte[] ADDRESS_MESSAGE_BYTES = HEX.decode("e3e1f3e86164647200000000000000001f000000" +
"ed52399b01e215104d010000000000000000000000000000000000ffff0a000001208d");

private static final byte[] TRANSACTION_MESSAGE_BYTES = HEX.withSeparator(" ", 2).decode(
"f9 be b4 d9 74 78 00 00 00 00 00 00 00 00 00 00" +
"e3 e1 f3 e8 74 78 00 00 00 00 00 00 00 00 00 00" +
"02 01 00 00 e2 93 cd be 01 00 00 00 01 6d bd db" +
"08 5b 1d 8a f7 51 84 f0 bc 01 fa d5 8d 12 66 e9" +
"b6 3b 50 88 19 90 e4 b4 0d 6a ee 36 29 00 00 00" +
Expand Down Expand Up @@ -137,7 +137,7 @@ public void testCachedParsing() throws Exception {
public void testHeaders1() throws Exception {
MessageSerializer serializer = MainNetParams.get().getDefaultSerializer();

byte[] headersMessageBytes = HEX.decode("f9beb4d9686561" +
byte[] headersMessageBytes = HEX.decode("e3e1f3e8686561" +
"646572730000000000520000005d4fab8101010000006fe28c0ab6f1b372c1a6a246ae6" +
"3f74f931e8365e15a089c68d6190000000000982051fd1e4ba744bbbe680e1fee14677b" +
"a1a3c3540bf7b1cdb606e857233e0e61bc6649ffff001d01e3629900");
Expand All @@ -163,7 +163,7 @@ public void testHeaders1() throws Exception {
public void testHeaders2() throws Exception {
MessageSerializer serializer = MainNetParams.get().getDefaultSerializer();

byte[] headersMessageBytes = HEX.decode("f9beb4d96865616465" +
byte[] headersMessageBytes = HEX.decode("e3e1f3e86865616465" +
"72730000000000e701000085acd4ea06010000006fe28c0ab6f1b372c1a6a246ae63f74f931e" +
"8365e15a089c68d6190000000000982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1c" +
"db606e857233e0e61bc6649ffff001d01e3629900010000004860eb18bf1b1620e37e9490fc8a" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ParseByteCacheTest {
private static final int BLOCK_HEIGHT_GENESIS = 0;

private final byte[] txMessage = HEX.withSeparator(" ", 2).decode(
"f9 be b4 d9 74 78 00 00 00 00 00 00 00 00 00 00" +
"e3 e1 f3 e8 74 78 00 00 00 00 00 00 00 00 00 00" +
"02 01 00 00 e2 93 cd be 01 00 00 00 01 6d bd db" +
"08 5b 1d 8a f7 51 84 f0 bc 01 fa d5 8d 12 66 e9" +
"b6 3b 50 88 19 90 e4 b4 0d 6a ee 36 29 00 00 00" +
Expand Down

0 comments on commit 8fb98b4

Please sign in to comment.