mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-14 11:15:51 +00:00
Add a serialVersionUID to other classes that were missing them. Thanks to Andreas for the report.
BUG=4
This commit is contained in:
parent
7310e294f9
commit
debd034c71
@ -54,7 +54,7 @@ public class Address {
|
||||
*
|
||||
* <pre>new Address(NetworkParameters.prodNet(), "17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL");</pre>
|
||||
*/
|
||||
public Address(NetworkParameters params, String address) throws AddressFormatException {
|
||||
public Address(NetworkParameters params, String address) throws AddressFormatException {
|
||||
this.params = params;
|
||||
this.hash160 = strToHash160(address);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AddressMessage extends Message {
|
||||
private static final long serialVersionUID = 8058283864924679460L;
|
||||
private static final long MAX_ADDRESSES = 1024;
|
||||
List<PeerAddress> addresses;
|
||||
|
||||
|
@ -33,8 +33,9 @@ import static com.google.bitcoin.core.Utils.*;
|
||||
* you grab it from a downloaded {@link BlockChain}.
|
||||
*/
|
||||
public class Block extends Message {
|
||||
static final long ALLOWED_TIME_DRIFT = 2 * 60 * 60; // Same value as official client.
|
||||
private static final long serialVersionUID = -2834162413473103042L;
|
||||
|
||||
static final long ALLOWED_TIME_DRIFT = 2 * 60 * 60; // Same value as official client.
|
||||
/** A value for difficultyTarget (nBits) that allows half of all possible hash solutions. Used in unit testing. */
|
||||
static final long EASIEST_DIFFICULTY_TARGET = 0x207fFFFFL;
|
||||
|
||||
|
@ -21,6 +21,7 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class GetBlocksMessage extends Message {
|
||||
private static final long serialVersionUID = 3479412877853645644L;
|
||||
private final List<byte[]> locator;
|
||||
private final byte[] stopHash;
|
||||
|
||||
|
@ -17,6 +17,8 @@
|
||||
package com.google.bitcoin.core;
|
||||
|
||||
public class GetDataMessage extends Message {
|
||||
private static final long serialVersionUID = 2754681589501709887L;
|
||||
|
||||
public GetDataMessage(NetworkParameters params, byte[] payloadBytes) throws ProtocolException {
|
||||
super(params, payloadBytes, 0);
|
||||
}
|
||||
|
@ -24,8 +24,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class InventoryMessage extends Message {
|
||||
private static final long serialVersionUID = -7050246551646107066L;
|
||||
private static final long MAX_INVENTORY_ITEMS = 50000;
|
||||
|
||||
|
||||
// For some reason the compiler complains if this is inside InventoryItem
|
||||
public List<InventoryItem> items;
|
||||
|
||||
|
@ -31,6 +31,8 @@ import java.util.Arrays;
|
||||
* This class is not useful for library users. If you want to talk to the network see the {@link Peer} class.
|
||||
*/
|
||||
public abstract class Message implements Serializable {
|
||||
private static final long serialVersionUID = -3561053461717079135L;
|
||||
|
||||
public static final int MAX_SIZE = 0x02000000;
|
||||
|
||||
// Useful to ensure serialize/deserialize are consistent with each other.
|
||||
|
@ -17,6 +17,7 @@
|
||||
package com.google.bitcoin.core;
|
||||
|
||||
public class UnknownMessage extends Message {
|
||||
private static final long serialVersionUID = 3614705938207918775L;
|
||||
private String name;
|
||||
|
||||
public UnknownMessage(NetworkParameters params, String name, byte[] payloadBytes) throws ProtocolException {
|
||||
|
@ -23,6 +23,8 @@ import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public class VersionMessage extends Message {
|
||||
private static final long serialVersionUID = 7313594258967483180L;
|
||||
|
||||
/**
|
||||
* The protocol version this library implements. A value of 31800 means 0.3.18.00.
|
||||
*/
|
||||
|
@ -264,7 +264,6 @@ public class Wallet implements Serializable {
|
||||
* our coins. This should be an address we own (is in the keychain).
|
||||
* @return a new {@link Transaction} or null if we cannot afford this send.
|
||||
*/
|
||||
|
||||
synchronized Transaction createSend(Address address, BigInteger nanocoins, Address changeAddress) {
|
||||
Utils.LOG("Creating send tx to " + address.toString() + " for " +
|
||||
Utils.bitcoinValueToFriendlyString(nanocoins));
|
||||
|
Loading…
x
Reference in New Issue
Block a user