Organize imports with shared IDEA configuration

Add .idea/codeStyleSettings.xml with explicit settings for each
2nd-level package used within ethereumj, adding a separator between
each (unfortunately there is no other way to gain this level of control
in IDEA).

Imports are generally in alphabetical order, with two key exceptions:

 - org.ethereumj.* imports are always sorted at top, to simplify the
process of seeing how one ethereumj type relates to all others. This is
especially useful in the practice of avoiding cyclic package
dependencies.

 - java.* and javax.* and sun.* imports are always sorted at bottom.

Wildcard imports are used for static imports whenever two or more
members of the same type are statically imported, but wildcards are
never used for non-static imports. This policy of explicitness helps
identify classes that are too "fat", i.e. have too many dependencies on
other types.

The root .gitignore file has been updated to allow
.idea/codeStyleSettings.xml, so as to automatically share it with other
team members. Any changes made to import organization settings will be
reflected in this file and should be checked in.
This commit is contained in:
Chris Beams 2014-12-27 02:14:10 +01:00
parent d7671814b7
commit 780393dae9
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73
183 changed files with 1238 additions and 544 deletions

1
.gitignore vendored
View File

@ -10,6 +10,7 @@ build
# IDEA
.idea
!.idea/codeStyleSettings.xml
*.iml
*.iws

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="2" />
<option name="IMPORT_LAYOUT_TABLE">
<value>
<emptyLine />
<package name="test.ethereum" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.ethereum" withSubpackages="true" static="false" />
<emptyLine />
<package name="com.cedarsoftware" withSubpackages="true" static="false" />
<emptyLine />
<package name="com.fasterxml" withSubpackages="true" static="false" />
<emptyLine />
<package name="com.google" withSubpackages="true" static="false" />
<emptyLine />
<package name="com.maxmind" withSubpackages="true" static="false" />
<emptyLine />
<package name="io.netty" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.antlr" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.apache" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.codehaus" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.fife" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.hibernate" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.iq80" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.json" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.junit" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.slf4j" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.spongycastle" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.springframework" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.w3c" withSubpackages="true" static="false" />
<emptyLine />
<package name="org.xml" withSubpackages="true" static="false" />
<emptyLine />
<package name="java" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.awt" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.io" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.lang" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.math" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.net" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.nio" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.security" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.sql" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.text" withSubpackages="true" static="false" />
<emptyLine />
<package name="java.util" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax.annotation" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax.persistence" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax.swing" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax.xml" withSubpackages="true" static="false" />
<emptyLine />
<package name="sun.misc" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="true" />
</value>
</option>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>

View File

@ -2,6 +2,7 @@ package org.ethereum.cli;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import static org.ethereum.config.SystemProperties.CONFIG;

View File

@ -1,13 +1,17 @@
package org.ethereum.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
/**
* Utility class to retrieve property values from the system.properties files

View File

@ -1,15 +1,20 @@
package org.ethereum.core;
import java.math.BigInteger;
import java.util.*;
import org.ethereum.crypto.ECKey;
import org.ethereum.manager.WorldManager;
import org.ethereum.util.Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
/**
* Representation of an actual account or contract
*/

View File

@ -2,12 +2,12 @@ package org.ethereum.core;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPList;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import static org.ethereum.crypto.HashUtil.EMPTY_DATA_HASH;
import static org.ethereum.crypto.HashUtil.EMPTY_TRIE_HASH;
import static org.ethereum.crypto.HashUtil.*;
public class AccountState {

View File

@ -4,14 +4,21 @@ import org.ethereum.crypto.HashUtil;
import org.ethereum.crypto.SHA3Helper;
import org.ethereum.trie.Trie;
import org.ethereum.trie.TrieImpl;
import org.ethereum.util.*;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.FastByteComparisons;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPElement;
import org.ethereum.util.RLPList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.Arrays;
import org.spongycastle.util.BigIntegers;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

View File

@ -9,9 +9,12 @@ import org.ethereum.net.BlockQueue;
import org.ethereum.net.server.ChannelManager;
import org.ethereum.util.AdvancedDeviceUtils;
import org.ethereum.vm.ProgramInvokeFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.FileSystemUtils;
@ -20,7 +23,9 @@ import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

View File

@ -1,6 +1,7 @@
package org.ethereum.core;
import org.ethereum.util.ByteUtil;
import org.spongycastle.util.encoders.Hex;
import java.util.Arrays;

View File

@ -1,11 +1,12 @@
package org.ethereum.core;
import org.ethereum.core.Block;
import org.ethereum.db.ByteArrayWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

View File

@ -1,14 +1,14 @@
package org.ethereum.core;
import static org.ethereum.crypto.HashUtil.EMPTY_LIST_HASH;
import static org.ethereum.crypto.HashUtil.sha3;
import java.math.BigInteger;
import org.ethereum.trie.Trie;
import org.ethereum.trie.TrieImpl;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import static org.ethereum.crypto.HashUtil.*;
/**
* The genesis block is the first block in the chain and has fixed values according to
* the protocol specification. The genesis block is 13 items, and is specified thus:

View File

@ -1,20 +1,21 @@
package org.ethereum.core;
import org.ethereum.crypto.ECKey.ECDSASignature;
import org.ethereum.crypto.ECKey;
import org.ethereum.crypto.ECKey.ECDSASignature;
import org.ethereum.crypto.ECKey.MissingPrivateKeyException;
import org.ethereum.crypto.HashUtil;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.BigIntegers;
import java.security.SignatureException;
import static org.ethereum.util.ByteUtil.EMPTY_BYTE_ARRAY;
import static org.ethereum.util.ByteUtil.ZERO_BYTE_ARRAY;
import static org.ethereum.util.ByteUtil.*;
/**
* A transaction (formally, T) is a single cryptographically

View File

@ -1,12 +1,22 @@
package org.ethereum.core;
import org.ethereum.facade.Repository;
import org.ethereum.vm.*;
import org.ethereum.vm.DataWord;
import org.ethereum.vm.GasCost;
import org.ethereum.vm.LogInfo;
import org.ethereum.vm.Program;
import org.ethereum.vm.ProgramInvoke;
import org.ethereum.vm.ProgramInvokeFactory;
import org.ethereum.vm.ProgramResult;
import org.ethereum.vm.VM;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.List;
import static org.ethereum.config.SystemProperties.CONFIG;

View File

@ -1,11 +1,16 @@
package org.ethereum.core;
import org.ethereum.util.*;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPElement;
import org.ethereum.util.RLPItem;
import org.ethereum.util.RLPList;
import org.ethereum.vm.LogInfo;
import org.spongycastle.util.BigIntegers;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

View File

@ -4,15 +4,36 @@ import org.ethereum.crypto.ECKey;
import org.ethereum.db.ByteArrayWrapper;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.submit.WalletTransaction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import org.w3c.dom.*;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@ -22,12 +43,6 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
/**
* The Wallet handles the management of accounts with addresses and private keys.
* New accounts can be generated and added to the wallet and existing accounts can be queried.

View File

@ -15,19 +15,9 @@ package org.ethereum.crypto;
* limitations under the License.
*/
import static org.ethereum.util.ByteUtil.bigIntegerToBytes;
import java.io.Serializable;
import java.math.BigInteger;
import java.nio.charset.Charset;
import java.security.SecureRandom;
import java.security.SignatureException;
import java.util.Arrays;
import javax.annotation.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.asn1.sec.SECNamedCurves;
import org.spongycastle.asn1.x9.X9ECParameters;
import org.spongycastle.asn1.x9.X9IntegerConverter;
@ -46,6 +36,21 @@ import org.spongycastle.math.ec.ECPoint;
import org.spongycastle.util.encoders.Base64;
import org.spongycastle.util.encoders.Hex;
import java.io.Serializable;
import java.math.BigInteger;
import java.nio.charset.Charset;
import java.security.SecureRandom;
import java.security.SignatureException;
import java.util.Arrays;
import javax.annotation.Nullable;
import static org.ethereum.util.ByteUtil.bigIntegerToBytes;
/**
* <p>Represents an elliptic curve public and (optionally) private key, usable for digital signatures but not encryption.
* Creating a new ECKey with the empty constructor will generate a new random keypair. Other static methods can be used

View File

@ -1,20 +1,21 @@
package org.ethereum.crypto;
import static java.util.Arrays.copyOfRange;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import static org.ethereum.util.ByteUtil.EMPTY_BYTE_ARRAY;
import org.ethereum.db.ByteArrayWrapper;
import org.ethereum.util.LRUMap;
import org.ethereum.util.RLP;
import org.ethereum.util.Utils;
import org.spongycastle.crypto.Digest;
import org.spongycastle.crypto.digests.RIPEMD160Digest;
import org.spongycastle.util.encoders.Hex;
import org.ethereum.util.LRUMap;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import static java.util.Arrays.copyOfRange;
import static org.ethereum.util.ByteUtil.EMPTY_BYTE_ARRAY;
public class HashUtil {

View File

@ -1,10 +1,10 @@
package org.ethereum.crypto;
import java.math.BigInteger;
import org.spongycastle.crypto.digests.SHA3Digest;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
public class SHA3Helper {
private static int DEFAULT_SIZE = 256;

View File

@ -2,7 +2,9 @@ package org.ethereum.db;
import org.ethereum.core.Block;
import org.ethereum.core.TransactionReceipt;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Repository;
@ -10,6 +12,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,10 +1,11 @@
package org.ethereum.db;
import java.math.BigInteger;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import java.math.BigInteger;
/**
* @author Roman Mandeleil

View File

@ -1,10 +1,11 @@
package org.ethereum.db;
import java.util.Arrays;
import org.ethereum.util.FastByteComparisons;
import org.spongycastle.util.encoders.Hex;
import java.util.Arrays;
/**
* @author Roman Mandeleil
* @since 11.06.2014

View File

@ -1,17 +1,22 @@
package org.ethereum.db;
import org.ethereum.trie.Trie;
import org.ethereum.trie.TrieImpl;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPElement;
import org.ethereum.util.RLPItem;
import org.ethereum.util.RLPList;
import org.ethereum.vm.DataWord;
import org.spongycastle.util.encoders.Hex;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.ethereum.trie.Trie;
import org.ethereum.trie.TrieImpl;
import org.ethereum.util.*;
import org.ethereum.vm.DataWord;
import org.spongycastle.util.encoders.Hex;
/**
* @author Roman Mandeleil
* @since 24.06.2014

View File

@ -1,22 +1,26 @@
package org.ethereum.db;
import static org.iq80.leveldb.impl.Iq80DBFactory.factory;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.ethereum.config.SystemProperties;
import org.iq80.leveldb.CompressionType;
import org.iq80.leveldb.DB;
import org.iq80.leveldb.DBIterator;
import org.iq80.leveldb.Options;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static org.iq80.leveldb.impl.Iq80DBFactory.factory;
/**
* Generic interface for Ethereum database
*

View File

@ -4,11 +4,16 @@ import org.ethereum.core.AccountState;
import org.ethereum.core.Block;
import org.ethereum.facade.Repository;
import org.ethereum.vm.DataWord;
import org.iq80.leveldb.DBIterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

View File

@ -1,7 +1,5 @@
package org.ethereum.db;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.ethereum.core.AccountState;
import org.ethereum.core.Block;
import org.ethereum.facade.Repository;
@ -10,10 +8,17 @@ import org.ethereum.json.JSONHelper;
import org.ethereum.trie.Trie;
import org.ethereum.trie.TrieImpl;
import org.ethereum.vm.DataWord;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.iq80.leveldb.DBIterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import org.springframework.stereotype.Component;
import org.springframework.util.FileSystemUtils;
@ -21,7 +26,9 @@ import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.List;

View File

@ -4,12 +4,16 @@ import org.ethereum.core.AccountState;
import org.ethereum.core.Block;
import org.ethereum.facade.Repository;
import org.ethereum.vm.DataWord;
import org.iq80.leveldb.DBIterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Set;

View File

@ -1,12 +1,14 @@
package org.ethereum.facade;
import java.math.BigInteger;
import java.util.List;
import org.ethereum.core.Block;
import org.ethereum.core.Chain;
import org.ethereum.core.Genesis;
import org.ethereum.core.TransactionReceipt;
import org.ethereum.net.BlockQueue;
import org.ethereum.core.Genesis;
import java.math.BigInteger;
import java.util.List;
public interface Blockchain {

View File

@ -9,7 +9,9 @@ import org.ethereum.net.peerdiscovery.PeerInfo;
import org.ethereum.net.server.ChannelManager;
import java.math.BigInteger;
import java.net.InetAddress;
import java.util.Set;
import java.util.concurrent.Future;

View File

@ -3,9 +3,12 @@ package org.ethereum.facade;
import org.ethereum.config.SystemProperties;
import org.ethereum.net.eth.EthHandler;
import org.ethereum.net.shh.ShhHandler;
import org.hibernate.SessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
@ -18,6 +21,7 @@ import org.springframework.orm.hibernate4.LocalSessionFactoryBuilder;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import java.sql.SQLException;
import java.util.Properties;
/**

View File

@ -1,12 +1,5 @@
package org.ethereum.facade;
import java.math.BigInteger;
import java.net.InetAddress;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import org.ethereum.core.Transaction;
import org.ethereum.core.Wallet;
import org.ethereum.listener.EthereumListener;
@ -19,12 +12,23 @@ import org.ethereum.net.server.PeerServer;
import org.ethereum.net.submit.TransactionExecutor;
import org.ethereum.net.submit.TransactionTask;
import org.ethereum.util.ByteUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import java.math.BigInteger;
import java.net.InetAddress;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import javax.annotation.PostConstruct;
import static org.ethereum.config.SystemProperties.CONFIG;

View File

@ -5,9 +5,11 @@ import org.ethereum.core.Block;
import org.ethereum.db.ByteArrayWrapper;
import org.ethereum.db.ContractDetails;
import org.ethereum.vm.DataWord;
import org.iq80.leveldb.DBIterator;
import java.math.BigInteger;
import java.util.HashMap;
/**

View File

@ -1,7 +1,5 @@
package org.ethereum.json;
import java.io.IOException;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
@ -10,6 +8,8 @@ import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
/**
* An extended {@link com.fasterxml.jackson.databind.ObjectMapper ObjectMapper} class to
* customize ethereum state dumps.

View File

@ -7,13 +7,17 @@ import org.ethereum.db.ContractDetails;
import org.ethereum.facade.Repository;
import org.ethereum.util.ByteUtil;
import org.ethereum.vm.DataWord;
import org.spongycastle.util.encoders.Hex;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* JSON Helper class to format data into ObjectNodes

View File

@ -3,11 +3,20 @@ package org.ethereum.jsontestsuite;
import org.ethereum.db.ContractDetails;
import org.ethereum.util.ByteUtil;
import org.ethereum.vm.DataWord;
import org.json.simple.JSONObject;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @author Roman Mandeleil

View File

@ -1,7 +1,9 @@
package org.ethereum.jsontestsuite;
import org.ethereum.util.ByteUtil;
import org.json.simple.JSONObject;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;

View File

@ -1,6 +1,7 @@
package org.ethereum.jsontestsuite;
import org.json.simple.JSONObject;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;

View File

@ -1,7 +1,9 @@
package org.ethereum.jsontestsuite;
import org.ethereum.util.ByteUtil;
import org.json.simple.JSONObject;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;

View File

@ -1,14 +1,19 @@
package org.ethereum.jsontestsuite;
import org.ethereum.util.ByteUtil;
import org.json.simple.JSONArray;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.util.regex.Pattern;
/**

View File

@ -1,15 +1,17 @@
package org.ethereum.jsontestsuite;
import org.ethereum.config.SystemProperties;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.file.Files;
import org.ethereum.config.SystemProperties;
import java.nio.file.Files;
public class JSONReader {

View File

@ -1,13 +1,16 @@
package org.ethereum.jsontestsuite;
import org.ethereum.vm.DataWord;
import org.ethereum.vm.LogInfo;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.spongycastle.util.encoders.Hex;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.ethereum.vm.DataWord;
import org.ethereum.vm.LogInfo;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.spongycastle.util.encoders.Hex;
public class Logs {
List<LogInfo> logs = new ArrayList<>();

View File

@ -1,9 +1,11 @@
package org.ethereum.jsontestsuite;
import org.ethereum.db.ByteArrayWrapper;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException;
import org.spongycastle.util.encoders.Hex;
import java.util.Arrays;

View File

@ -2,10 +2,13 @@ package org.ethereum.jsontestsuite;
import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
/**
* @author Roman Mandeleil

View File

@ -2,13 +2,19 @@ package org.ethereum.jsontestsuite;
import org.ethereum.db.ByteArrayWrapper;
import org.ethereum.util.ByteUtil;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Roman Mandeleil

View File

@ -1,10 +1,14 @@
package org.ethereum.jsontestsuite;
import org.ethereum.core.*;
import org.ethereum.core.Block;
import org.ethereum.core.Transaction;
import org.ethereum.facade.Repository;
import org.ethereum.util.ByteUtil;
import org.ethereum.vm.*;
import org.ethereum.vm.DataWord;
import org.ethereum.vm.Program;
import org.ethereum.vm.ProgramInvoke;
import org.ethereum.vm.ProgramInvokeFactory;
import org.ethereum.vm.ProgramInvokeImpl;
import java.math.BigInteger;

View File

@ -7,17 +7,30 @@ import org.ethereum.db.ContractDetails;
import org.ethereum.db.RepositoryDummy;
import org.ethereum.facade.Repository;
import org.ethereum.util.ByteUtil;
import org.ethereum.vm.*;
import org.ethereum.vm.DataWord;
import org.ethereum.vm.LogInfo;
import org.ethereum.vm.Program;
import org.ethereum.vm.ProgramInvoke;
import org.ethereum.vm.ProgramInvokeFactory;
import org.ethereum.vm.ProgramInvokeImpl;
import org.ethereum.vm.VM;
import org.ethereum.vmtrace.ProgramTrace;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.*;
import static org.ethereum.util.ByteUtil.EMPTY_BYTE_ARRAY;
import static org.ethereum.util.ByteUtil.wrap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static org.ethereum.util.ByteUtil.*;
/**
* @author Roman Mandeleil

View File

@ -3,7 +3,9 @@ package org.ethereum.jsontestsuite;
import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* @author Roman Mandeleil

View File

@ -1,6 +1,7 @@
package org.ethereum.jsontestsuite;
import org.json.simple.JSONObject;
import static org.ethereum.util.ByteUtil.toHexString;
/**

View File

@ -1,6 +1,7 @@
package org.ethereum.jsontestsuite;
import org.ethereum.util.ByteUtil;
import org.spongycastle.util.encoders.Hex;
/**

View File

@ -3,6 +3,7 @@ package org.ethereum.listener;
import org.ethereum.core.Block;
import org.ethereum.core.Transaction;
import org.ethereum.net.message.Message;
import org.springframework.stereotype.Component;
import java.util.Set;

View File

@ -1,6 +1,10 @@
package org.ethereum.manager;
import org.ethereum.core.*;
import org.ethereum.core.Block;
import org.ethereum.core.Genesis;
import org.ethereum.core.Transaction;
import org.ethereum.core.TransactionReceipt;
import org.ethereum.core.Wallet;
import org.ethereum.crypto.HashUtil;
import org.ethereum.db.BlockStore;
import org.ethereum.facade.Blockchain;
@ -10,16 +14,25 @@ import org.ethereum.listener.EthereumListenerWrapper;
import org.ethereum.net.client.PeerClient;
import org.ethereum.net.peerdiscovery.PeerDiscovery;
import org.ethereum.net.server.ChannelManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.math.BigInteger;
import java.util.*;
import static org.ethereum.config.SystemProperties.CONFIG;

View File

@ -4,10 +4,13 @@ import org.ethereum.core.Block;
import org.ethereum.crypto.SHA3Helper;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.FastByteComparisons;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.Arrays;
import org.spongycastle.util.BigIntegers;
import java.math.BigInteger;
/**

View File

@ -1,19 +1,31 @@
package org.ethereum.net;
import static org.ethereum.config.SystemProperties.CONFIG;
import org.ethereum.core.Block;
import org.ethereum.facade.Blockchain;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.math.BigInteger;
import java.util.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.ListIterator;
import java.util.Queue;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentLinkedQueue;
import static org.ethereum.config.SystemProperties.CONFIG;
/**
* The processing queue for blocks to be validated and added to the blockchain.
* This class also maintains the list of hashes from the peer with the heaviest sub-tree.

View File

@ -1,18 +1,22 @@
package org.ethereum.net;
import io.netty.channel.ChannelHandlerContext;
import org.ethereum.listener.EthereumListener;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.message.*;
import org.ethereum.net.message.Message;
import org.ethereum.net.p2p.PingMessage;
import io.netty.channel.ChannelHandlerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.Queue;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentLinkedQueue;
/**

View File

@ -1,5 +1,9 @@
package org.ethereum.net.client;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.server.ChannelManager;
import org.ethereum.net.server.EthereumChannelInitializer;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelOption;
@ -7,11 +11,10 @@ import io.netty.channel.DefaultMessageSizeEstimator;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.server.ChannelManager;
import org.ethereum.net.server.EthereumChannelInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

View File

@ -1,16 +1,15 @@
package org.ethereum.net.eth;
import static org.ethereum.net.eth.EthMessageCodes.BLOCK_HASHES;
import java.util.ArrayList;
import java.util.List;
import org.ethereum.net.eth.EthMessage;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPItem;
import org.ethereum.util.RLPList;
import org.ethereum.util.Utils;
import java.util.ArrayList;
import java.util.List;
import static org.ethereum.net.eth.EthMessageCodes.BLOCK_HASHES;
/**
* Wrapper around an Ethereum BlockHashes message on the network
*

View File

@ -1,13 +1,13 @@
package org.ethereum.net.eth;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import org.ethereum.core.Block;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPList;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import static org.ethereum.net.eth.EthMessageCodes.BLOCKS;
/**

View File

@ -1,7 +1,5 @@
package org.ethereum.net.eth;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.ethereum.core.Block;
import org.ethereum.core.Genesis;
import org.ethereum.core.Transaction;
@ -13,14 +11,27 @@ import org.ethereum.net.message.ReasonCode;
import org.ethereum.net.p2p.DisconnectMessage;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.FastByteComparisons;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.math.BigInteger;
import java.util.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.Vector;
import static org.ethereum.config.SystemProperties.CONFIG;
import static org.ethereum.net.message.StaticMessages.GET_TRANSACTIONS_MESSAGE;

View File

@ -1,6 +1,5 @@
package org.ethereum.net.eth;
import org.ethereum.net.eth.EthMessageCodes;
import org.ethereum.net.message.Message;
public abstract class EthMessage extends Message {

View File

@ -1,12 +1,13 @@
package org.ethereum.net.eth;
import static org.ethereum.net.eth.EthMessageCodes.GET_BLOCK_HASHES;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPList;
import org.spongycastle.util.encoders.Hex;
import static org.ethereum.net.eth.EthMessageCodes.GET_BLOCK_HASHES;
/**
* Wrapper around an Ethereum GetBlockHashes message on the network
*

View File

@ -1,13 +1,13 @@
package org.ethereum.net.eth;
import java.util.ArrayList;
import java.util.List;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPItem;
import org.ethereum.util.RLPList;
import org.ethereum.util.Utils;
import java.util.ArrayList;
import java.util.List;
import static org.ethereum.net.eth.EthMessageCodes.GET_BLOCKS;
/**

View File

@ -1,7 +1,5 @@
package org.ethereum.net.eth;
import org.ethereum.net.eth.EthMessage;
import org.ethereum.net.eth.TransactionsMessage;
import org.spongycastle.util.encoders.Hex;
/**

View File

@ -3,6 +3,7 @@ package org.ethereum.net.eth;
import org.ethereum.core.Block;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPList;
import org.spongycastle.util.encoders.Hex;
/**

View File

@ -4,6 +4,7 @@ import org.ethereum.util.ByteUtil;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPItem;
import org.ethereum.util.RLPList;
import org.spongycastle.util.encoders.Hex;
import static org.ethereum.net.eth.EthMessageCodes.STATUS;

View File

@ -1,9 +1,6 @@
package org.ethereum.net.eth;
import static org.ethereum.net.eth.EthMessageCodes.TRANSACTIONS;
import org.ethereum.core.Transaction;
import org.ethereum.net.eth.EthMessage;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPList;
@ -12,6 +9,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static org.ethereum.net.eth.EthMessageCodes.TRANSACTIONS;
/**
* Wrapper around an Ethereum Transactions message on the network
*

View File

@ -1,7 +1,18 @@
package org.ethereum.net.message;
import org.ethereum.net.eth.*;
import org.ethereum.net.p2p.*;
import org.ethereum.net.eth.BlockHashesMessage;
import org.ethereum.net.eth.BlocksMessage;
import org.ethereum.net.eth.EthMessageCodes;
import org.ethereum.net.eth.GetBlockHashesMessage;
import org.ethereum.net.eth.GetBlocksMessage;
import org.ethereum.net.eth.NewBlockMessage;
import org.ethereum.net.eth.PacketCountMessage;
import org.ethereum.net.eth.StatusMessage;
import org.ethereum.net.eth.TransactionsMessage;
import org.ethereum.net.p2p.DisconnectMessage;
import org.ethereum.net.p2p.HelloMessage;
import org.ethereum.net.p2p.P2pMessageCodes;
import org.ethereum.net.p2p.PeersMessage;
import org.ethereum.net.shh.ShhMessageCodes;
import org.ethereum.util.RLP;

View File

@ -1,8 +1,5 @@
package org.ethereum.net.message;
import java.util.Arrays;
import java.util.List;
import org.ethereum.config.SystemProperties;
import org.ethereum.crypto.HashUtil;
import org.ethereum.net.client.Capability;
@ -14,8 +11,12 @@ import org.ethereum.net.p2p.P2pHandler;
import org.ethereum.net.p2p.PingMessage;
import org.ethereum.net.p2p.PongMessage;
import org.ethereum.net.shh.ShhHandler;
import org.spongycastle.util.encoders.Hex;
import java.util.Arrays;
import java.util.List;
/**
* This class contains static values of messages on the network. These message
* will always be the same and therefore don't need to be created each time.

View File

@ -1,13 +1,12 @@
package org.ethereum.net.p2p;
import org.ethereum.net.message.ReasonCode;
import org.ethereum.net.p2p.P2pMessage;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPItem;
import org.ethereum.util.RLPList;
import static org.ethereum.net.p2p.P2pMessageCodes.DISCONNECT;
import static org.ethereum.net.message.ReasonCode.REQUESTED;
import static org.ethereum.net.p2p.P2pMessageCodes.DISCONNECT;
/**
* Wrapper around an Ethereum Disconnect message on the network

View File

@ -1,18 +1,22 @@
package org.ethereum.net.p2p;
import static org.ethereum.net.p2p.P2pMessageCodes.HELLO;
import static org.ethereum.util.ByteUtil.EMPTY_BYTE_ARRAY;
import org.ethereum.net.client.Capability;
import org.ethereum.net.p2p.P2pMessage;
import org.ethereum.util.*;
import org.spongycastle.util.encoders.Hex;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPElement;
import org.ethereum.util.RLPItem;
import org.ethereum.util.RLPList;
import com.google.common.base.Joiner;
import org.spongycastle.util.encoders.Hex;
import java.util.ArrayList;
import java.util.List;
import static org.ethereum.net.p2p.P2pMessageCodes.HELLO;
import static org.ethereum.util.ByteUtil.EMPTY_BYTE_ARRAY;
/**
* Wrapper around an Ethereum HelloMessage on the network
*

View File

@ -1,16 +1,5 @@
package org.ethereum.net.p2p;
import static org.ethereum.net.message.StaticMessages.PING_MESSAGE;
import static org.ethereum.net.message.StaticMessages.PONG_MESSAGE;
import static org.ethereum.net.message.StaticMessages.HELLO_MESSAGE;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.*;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.ethereum.core.Block;
import org.ethereum.core.Transaction;
import org.ethereum.manager.WorldManager;
@ -20,16 +9,35 @@ import org.ethereum.net.eth.EthHandler;
import org.ethereum.net.eth.EthMessageCodes;
import org.ethereum.net.eth.NewBlockMessage;
import org.ethereum.net.eth.TransactionsMessage;
import org.ethereum.net.message.ReasonCode;
import org.ethereum.net.message.StaticMessages;
import org.ethereum.net.peerdiscovery.PeerInfo;
import org.ethereum.net.shh.ShhHandler;
import org.ethereum.net.message.*;
import org.ethereum.net.shh.ShhMessageCodes;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import static org.ethereum.net.message.StaticMessages.*;
/**
* Process the basic protocol messages between every peer on the network.
*

View File

@ -1,7 +1,6 @@
package org.ethereum.net.p2p;
import org.ethereum.net.message.Message;
import org.ethereum.net.p2p.P2pMessageCodes;
public abstract class P2pMessage extends Message {

View File

@ -2,9 +2,11 @@ package org.ethereum.net.p2p;
import org.ethereum.net.client.Capability;
import org.ethereum.util.RLP;
import org.spongycastle.util.encoders.Hex;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,19 +1,19 @@
package org.ethereum.net.p2p;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPList;
import org.spongycastle.util.encoders.Hex;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.ethereum.net.p2p.P2pMessage;
import org.ethereum.net.p2p.Peer;
import org.ethereum.util.ByteUtil;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPList;
import org.spongycastle.util.encoders.Hex;
/**
* Wrapper around an Ethereum Peers message on the network
*

View File

@ -1,6 +1,5 @@
package org.ethereum.net.p2p;
import org.ethereum.net.p2p.P2pMessage;
import org.spongycastle.util.encoders.Hex;
/**

View File

@ -1,10 +1,5 @@
package org.ethereum.net.peerdiscovery;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.timeout.ReadTimeoutHandler;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.MessageQueue;
import org.ethereum.net.client.Capability;
@ -15,8 +10,21 @@ import org.ethereum.net.p2p.P2pHandler;
import org.ethereum.net.shh.ShhHandler;
import org.ethereum.net.wire.MessageDecoder;
import org.ethereum.net.wire.MessageEncoder;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.DefaultMessageSizeEstimator;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.FixedRecvByteBufAllocator;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.timeout.ReadTimeoutHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Scope;

View File

@ -1,16 +1,30 @@
package org.ethereum.net.peerdiscovery;
import org.ethereum.net.p2p.Peer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.*;
import java.util.concurrent.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import static org.ethereum.config.SystemProperties.CONFIG;

View File

@ -3,7 +3,9 @@ package org.ethereum.net.peerdiscovery;
import org.ethereum.net.client.Capability;
import org.ethereum.net.eth.StatusMessage;
import org.ethereum.net.p2p.HelloMessage;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;

View File

@ -2,6 +2,7 @@ package org.ethereum.net.peerdiscovery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Scope;

View File

@ -8,6 +8,7 @@ import org.ethereum.net.p2p.P2pHandler;
import org.ethereum.net.shh.ShhHandler;
import org.ethereum.net.wire.MessageDecoder;
import org.ethereum.net.wire.MessageEncoder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

View File

@ -4,13 +4,23 @@ import org.ethereum.core.Block;
import org.ethereum.core.Transaction;
import org.ethereum.db.ByteArrayWrapper;
import org.ethereum.manager.WorldManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import javax.annotation.PostConstruct;
import java.util.*;
/**
* @author Roman Mandeleil

View File

@ -1,15 +1,18 @@
package org.ethereum.net.server;
import org.ethereum.facade.Blockchain;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.client.Capability;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.FixedRecvByteBufAllocator;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.timeout.ReadTimeoutHandler;
import org.ethereum.facade.Blockchain;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.client.Capability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

View File

@ -1,5 +1,7 @@
package org.ethereum.net.server;
import org.ethereum.manager.WorldManager;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelOption;
@ -8,9 +10,10 @@ import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.logging.LoggingHandler;
import org.ethereum.manager.WorldManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

View File

@ -1,11 +1,14 @@
package org.ethereum.net.shh;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.MessageQueue;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.MessageQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

View File

@ -1,11 +1,11 @@
package org.ethereum.net.submit;
import org.ethereum.core.Transaction;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import org.ethereum.core.Transaction;
/**
* @author Roman Mandeleil
* @since 23.05.2014

View File

@ -4,6 +4,7 @@ import org.ethereum.core.Transaction;
import org.ethereum.core.Wallet;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.server.ChannelManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,16 +1,19 @@
package org.ethereum.net.wire;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import org.ethereum.listener.EthereumListener;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.message.Message;
import org.ethereum.net.message.MessageFactory;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

View File

@ -1,16 +1,19 @@
package org.ethereum.net.wire;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import org.ethereum.manager.WorldManager;
import org.ethereum.net.message.Message;
import org.ethereum.net.message.StaticMessages;
import org.ethereum.util.ByteUtil;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

View File

@ -1,6 +1,15 @@
package org.ethereum.serpent;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.BaseErrorListener;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.DiagnosticErrorListener;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.Parser;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.atn.PredictionMode;
import org.antlr.v4.runtime.misc.Nullable;

View File

@ -1,13 +1,17 @@
package org.ethereum.serpent;
import org.antlr.v4.runtime.tree.ParseTree;
import org.ethereum.util.ByteUtil;
import org.ethereum.vm.OpCode;
import org.antlr.v4.runtime.tree.ParseTree;
import org.spongycastle.util.Arrays;
import org.spongycastle.util.BigIntegers;
import java.io.ByteArrayOutputStream;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;

View File

@ -1,10 +1,13 @@
package org.ethereum.serpent;
import org.antlr.v4.runtime.misc.NotNull;
import org.ethereum.crypto.HashUtil;
import org.antlr.v4.runtime.misc.NotNull;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

View File

@ -1,14 +1,16 @@
package org.ethereum.trie;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import org.ethereum.crypto.HashUtil;
import org.ethereum.db.ByteArrayWrapper;
import org.ethereum.util.Value;
import org.iq80.leveldb.DB;
import org.iq80.leveldb.WriteBatch;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author Nick Savers
* @since 20.05.2014

View File

@ -1,6 +1,7 @@
package org.ethereum.trie;
import org.ethereum.util.Value;
import org.spongycastle.util.encoders.Hex;
/**

View File

@ -1,23 +1,28 @@
package org.ethereum.trie;
import static java.util.Arrays.copyOfRange;
import static org.ethereum.crypto.HashUtil.EMPTY_TRIE_HASH;
import static org.ethereum.util.ByteUtil.matchingNibbleLength;
import static org.ethereum.util.CompactEncoder.binToNibbles;
import static org.ethereum.util.CompactEncoder.packNibbles;
import static org.ethereum.util.CompactEncoder.unpackToNibbles;
import static org.spongycastle.util.Arrays.concatenate;
import java.util.*;
import org.ethereum.crypto.HashUtil;
import org.ethereum.db.ByteArrayWrapper;
import org.ethereum.util.Value;
import org.iq80.leveldb.DB;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static java.util.Arrays.copyOfRange;
import static org.ethereum.crypto.HashUtil.EMPTY_TRIE_HASH;
import static org.ethereum.util.ByteUtil.matchingNibbleLength;
import static org.ethereum.util.CompactEncoder.*;
import static org.spongycastle.util.Arrays.concatenate;
/**
* The modified Merkle Patricia tree (trie) provides a persistent data structure
* to map between arbitrary-length binary data (byte arrays). It is defined in terms of

View File

@ -1,9 +1,9 @@
package org.ethereum.trie;
import java.util.List;
import org.ethereum.util.Value;
import java.util.List;
import static org.ethereum.util.CompactEncoder.unpackToNibbles;
/*

View File

@ -1,13 +1,17 @@
package org.ethereum.util;
import org.ethereum.db.ByteArrayWrapper;
import org.spongycastle.util.encoders.Hex;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.ethereum.db.ByteArrayWrapper;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.util.Arrays;
public class ByteUtil {

View File

@ -1,17 +1,17 @@
package org.ethereum.util;
import static java.util.Arrays.copyOf;
import static java.util.Arrays.copyOfRange;
import java.io.ByteArrayOutputStream;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
import static java.util.Arrays.*;
import static org.ethereum.util.ByteUtil.appendByte;
import static org.spongycastle.util.Arrays.concatenate;
import static org.spongycastle.util.encoders.Hex.encode;
import java.io.ByteArrayOutputStream;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
/**
* Compact encoding of hex sequence with optional terminator
*

View File

@ -1,9 +1,9 @@
package org.ethereum.util;
import java.io.Serializable;
import org.spongycastle.util.encoders.Hex;
import java.io.Serializable;
@SuppressWarnings("serial")
public class DecodeResult implements Serializable {

View File

@ -17,16 +17,18 @@
*/
package org.ethereum.util;
import com.google.common.primitives.Longs;
import com.google.common.primitives.UnsignedBytes;
import java.lang.reflect.Field;
import java.nio.ByteOrder;
import java.security.AccessController;
import java.security.PrivilegedAction;
import sun.misc.Unsafe;
import com.google.common.primitives.Longs;
import com.google.common.primitives.UnsignedBytes;
/**
* Utility code to do optimized byte-array comparison.
* This is borrowed and slightly modified from Guava's {@link UnsignedBytes}

View File

@ -1,9 +1,12 @@
package org.ethereum.util;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Queue;
import static java.util.Arrays.copyOfRange;
@ -11,12 +14,6 @@ import static org.ethereum.util.ByteUtil.byteArrayToInt;
import static org.spongycastle.util.Arrays.concatenate;
import static org.spongycastle.util.BigIntegers.asUnsignedByteArray;
import java.util.List;
import org.ethereum.util.RLP;
import org.ethereum.util.RLPItem;
import org.ethereum.util.RLPList;
/**
* Recursive Length Prefix (RLP) encoding.
*

View File

@ -1,18 +1,23 @@
package org.ethereum.util;
import java.math.BigInteger;
import java.net.URL;
import java.security.SecureRandom;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;
import javax.swing.ImageIcon;
import org.spongycastle.util.encoders.DecoderException;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.net.URL;
import java.security.SecureRandom;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;
import javax.swing.*;
public class Utils {
private static SecureRandom random = new SecureRandom();

View File

@ -1,12 +1,14 @@
package org.ethereum.util;
import com.cedarsoftware.util.DeepEquals;
import org.spongycastle.util.encoders.Hex;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.List;
import com.cedarsoftware.util.DeepEquals;
import org.spongycastle.util.encoders.Hex;
/**
* Class to encapsulate an object and provide utilities for conversion
*/

Some files were not shown because too many files have changed in this diff Show More