3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-13 10:45:51 +00:00

Fix last remaining occurences of 'BitCoin' and 'BitCoinJ'.

This commit is contained in:
Andreas Schildbach 2015-07-17 00:51:32 +02:00
parent af1931db6e
commit 4112ed8005
5 changed files with 25 additions and 23 deletions

View File

@ -262,8 +262,8 @@ public class VersionMessage extends Message {
/**
* Appends the given user-agent information to the subVer field. The subVer is composed of a series of
* name:version pairs separated by slashes in the form of a path. For example a typical subVer field for BitCoinJ
* users might look like "/BitCoinJ:0.4-SNAPSHOT/MultiBit:1.2/" where libraries come further to the left.<p>
* name:version pairs separated by slashes in the form of a path. For example a typical subVer field for bitcoinj
* users might look like "/bitcoinj:0.13/MultiBit:1.2/" where libraries come further to the left.<p>
*
* There can be as many components as you feel a need for, and the version string can be anything, but it is
* recommended to use A.B.C where A = major, B = minor and C = revision for software releases, and dates for
@ -272,7 +272,7 @@ public class VersionMessage extends Message {
*
* Anything put in the "comments" field will appear in brackets and may be used for platform info, or anything
* else. For example, calling <tt>appendToSubVer("MultiBit", "1.0", "Windows")</tt> will result in a subVer being
* set of "/BitCoinJ:1.0/MultiBit:1.0(Windows)/". Therefore the / ( and ) characters are reserved in all these
* set of "/bitcoinj:1.0/MultiBit:1.0(Windows)/". Therefore the / ( and ) characters are reserved in all these
* components. If you don't want to add a comment (recommended), pass null.<p>
*
* See <a href="https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki">BIP 14</a> for more information.

View File

@ -197,7 +197,7 @@ public class IrcDiscovery implements PeerDiscovery {
static ArrayList<InetSocketAddress> parseUserList(String[] userNames) throws UnknownHostException {
ArrayList<InetSocketAddress> addresses = new ArrayList<InetSocketAddress>();
for (String user : userNames) {
// All BitCoin peers start their nicknames with a 'u' character.
// All peers start their nicknames with a 'u' character.
if (!user.startsWith("u")) {
continue;
}
@ -208,7 +208,7 @@ public class IrcDiscovery implements PeerDiscovery {
byte[] addressBytes;
try {
// Strip off the "u" before decoding. Note that it's possible for anyone to join these IRC channels and
// so simply beginning with "u" does not imply this is a valid BitCoin encoded address.
// so simply beginning with "u" does not imply this is a valid encoded address.
//
// decodeChecked removes the checksum from the returned bytes.
addressBytes = Base58.decodeChecked(user.substring(1));

View File

@ -25,7 +25,7 @@ import org.bitcoinj.core.StoredBlock;
* different ways. An in-memory implementation (MemoryBlockStore) exists for unit testing but real apps will want to
* use implementations that save to disk.<p>
*
* A BlockStore is a map of hashes to StoredBlock. The hash is the double digest of the BitCoin serialization
* A BlockStore is a map of hashes to StoredBlock. The hash is the double digest of the Bitcoin serialization
* of the block header, <b>not</b> the header with the extra data as well.<p>
*
* BlockStores are thread safe.

View File

@ -128,7 +128,7 @@ public class BlockTest {
}
@Test
public void testBitCoinSerialization() throws Exception {
public void testBitcoinSerialization() throws Exception {
// We have to be able to reserialize everything exactly as we found it for hashing to work. This test also
// proves that transaction serialization works, along with all its subobjects like scripts and in/outpoints.
//

View File

@ -21,6 +21,8 @@ import org.bitcoinj.params.UnitTestParams;
import org.junit.Test;
import static org.bitcoinj.core.Utils.HEX;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class VersionMessageTest {
@ -29,24 +31,24 @@ public class VersionMessageTest {
public void testDecode() throws Exception {
NetworkParameters params = UnitTestParams.get();
VersionMessage ver = new VersionMessage(params, HEX.decode("71110100000000000000000048e5e95000000000000000000000000000000000000000000000ffff7f000001479d000000000000000000000000000000000000ffff7f000001479d0000000000000000172f426974436f696e4a3a302e372d534e415053484f542f0004000000"));
assertTrue(!ver.relayTxesBeforeFilter);
assertTrue(ver.bestHeight == 1024);
assertTrue(ver.subVer.equals("/BitCoinJ:0.7-SNAPSHOT/"));
VersionMessage ver = new VersionMessage(params, HEX.decode("7111010000000000000000003334a85500000000000000000000000000000000000000000000ffff7f000001479d000000000000000000000000000000000000ffff7f000001479d00000000000000000f2f626974636f696e6a3a302e31332f0004000000"));
assertFalse(ver.relayTxesBeforeFilter);
assertEquals(1024, ver.bestHeight);
assertEquals("/bitcoinj:0.13/", ver.subVer);
ver = new VersionMessage(params, HEX.decode("71110100000000000000000048e5e95000000000000000000000000000000000000000000000ffff7f000001479d000000000000000000000000000000000000ffff7f000001479d0000000000000000172f426974436f696e4a3a302e372d534e415053484f542f00040000"));
ver = new VersionMessage(params, HEX.decode("711101000000000000000000a634a85500000000000000000000000000000000000000000000ffff7f000001479d000000000000000000000000000000000000ffff7f000001479d00000000000000000f2f626974636f696e6a3a302e31332f0004000001"));
assertTrue(ver.relayTxesBeforeFilter);
assertTrue(ver.bestHeight == 1024);
assertTrue(ver.subVer.equals("/BitCoinJ:0.7-SNAPSHOT/"));
assertEquals(1024, ver.bestHeight);
assertEquals("/bitcoinj:0.13/", ver.subVer);
ver = new VersionMessage(params, HEX.decode("71110100000000000000000048e5e95000000000000000000000000000000000000000000000ffff7f000001479d000000000000000000000000000000000000ffff7f000001479d0000000000000000172f426974436f696e4a3a302e372d534e415053484f542f"));
ver = new VersionMessage(params, HEX.decode("711101000000000000000000c334a85500000000000000000000000000000000000000000000ffff7f000001479d000000000000000000000000000000000000ffff7f000001479d00000000000000000f2f626974636f696e6a3a302e31332f0000000001"));
assertTrue(ver.relayTxesBeforeFilter);
assertTrue(ver.bestHeight == 0);
assertTrue(ver.subVer.equals("/BitCoinJ:0.7-SNAPSHOT/"));
assertEquals(0, ver.bestHeight);
assertEquals("/bitcoinj:0.13/", ver.subVer);
ver = new VersionMessage(params, HEX.decode("71110100000000000000000048e5e95000000000000000000000000000000000000000000000ffff7f000001479d000000000000000000000000000000000000ffff7f000001479d0000000000000000"));
assertTrue(ver.relayTxesBeforeFilter);
assertTrue(ver.bestHeight == 0);
assertTrue(ver.subVer.equals(""));
assertEquals(0, ver.bestHeight);
assertEquals("", ver.subVer);
}
}