Polish formatting
The sources affected by this commit have drifted in style since earlier polishing commits such asf34d1f4
anda155518
. The shared IDEA style configuration file can help avoid this drift in the future. Simply run Code->Reformat Code at the project level prior to committing. Note that this code style configuration is not perfect, and not every change it makes should be checked in. The ideal is to simply always write code that conforms to the style conventions, but the automated settings are there as a helping hand when necessary. The churn caused by drifting style and the commits that fix it damage the utility of git over time. Reviewing changes, analyzing history, surgically reverting commits, and many other use cases with git simply do not work as well when styles get mixed and fixed. Let's work toward a common style.
This commit is contained in:
parent
38c241f9e6
commit
9127c01890
|
@ -10,12 +10,17 @@ import java.util.Set;
|
|||
public interface KeyValueDataSource {
|
||||
|
||||
public void init();
|
||||
|
||||
public void setName(String name);
|
||||
|
||||
public byte[] get(byte[] key);
|
||||
|
||||
public void put(byte[] key, byte[] value);
|
||||
|
||||
public void delete(byte[] key);
|
||||
|
||||
public Set<byte[]> keys();
|
||||
|
||||
public void updateBatch(Map<byte[], byte[]> rows);
|
||||
|
||||
public void close();
|
||||
|
|
|
@ -65,9 +65,11 @@ public class EthereumImpl implements Ethereum {
|
|||
worldManager.loadBlockchain();
|
||||
if (CONFIG.listenPort() > 0) {
|
||||
Executors.newSingleThreadExecutor().submit(
|
||||
new Runnable() { public void run() {
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
peerServer.start(CONFIG.listenPort());
|
||||
}}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class TestRunner {
|
|||
|
||||
public List<String> runTestCase(StateTestCase testCase) {
|
||||
|
||||
List<String> results = new ArrayList<>();;
|
||||
List<String> results = new ArrayList<>();
|
||||
logger.info("\n***");
|
||||
logger.info(" Running test case: [" + testCase.getName() + "]");
|
||||
logger.info("***\n");
|
||||
|
|
|
@ -30,6 +30,7 @@ public class PrecompiledContracts {
|
|||
|
||||
public static abstract class PrecompiledContract {
|
||||
public abstract long getGasForData(byte[] data);
|
||||
|
||||
public abstract byte[] execute(byte[] data);
|
||||
}
|
||||
|
||||
|
@ -126,7 +127,8 @@ public class PrecompiledContracts {
|
|||
|
||||
ECKey key = ECKey.signatureToKey(h, signature.toBase64());
|
||||
out = new DataWord(key.getAddress());
|
||||
} catch (Throwable any){}
|
||||
} catch (Throwable any) {
|
||||
}
|
||||
|
||||
if (out == null) out = new DataWord(0);
|
||||
|
||||
|
@ -135,5 +137,4 @@ public class PrecompiledContracts {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -141,8 +141,8 @@ public class TransactionTest {
|
|||
String RLP_ENCODED_SIGNED_TX = "f86b8085e8d4a510008227109413978aee95f38490e9769c39b2773ed763d9cd5f872386f26fc10000801ba0eab47c1a49bf2fe5d40e01d313900e19ca485867d462fe06e139e3a536c6d4f4a014a569d327dcda4b29f74f93c0e9729d2f49ad726e703f9cd90dbb0fbf6649f1";
|
||||
String KEY = "c85ef7d79691fe79573b1a7064c19c1a9819ebdbd1faaab1a8ec92344438aaf4";
|
||||
byte[] testNonce = Hex.decode("");
|
||||
byte[] testGasPrice = BigIntegers.asUnsignedByteArray(BigInteger.valueOf(1000000000000L));;
|
||||
byte[] testGasLimit = BigIntegers.asUnsignedByteArray(BigInteger.valueOf(10000));;
|
||||
byte[] testGasPrice = BigIntegers.asUnsignedByteArray(BigInteger.valueOf(1000000000000L));
|
||||
byte[] testGasLimit = BigIntegers.asUnsignedByteArray(BigInteger.valueOf(10000));
|
||||
byte[] testReceiveAddress = Hex.decode("13978aee95f38490e9769c39b2773ed763d9cd5f");
|
||||
byte[] testValue = BigIntegers.asUnsignedByteArray(BigInteger.valueOf(10000000000000000L));
|
||||
byte[] testData = Hex.decode("");
|
||||
|
|
|
@ -17,7 +17,6 @@ import static org.junit.Assert.*;
|
|||
public class PrecompiledContractTest {
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void identityTest1() {
|
||||
|
||||
|
|
|
@ -460,13 +460,11 @@ public class SerpentTokenMaker extends AbstractTokenMaker {
|
|||
default:
|
||||
if (RSyntaxUtilities.isLetter(c) || c == ' ') { // No tab, just space; spaces are okay in variable names.
|
||||
break;
|
||||
}
|
||||
else if (RSyntaxUtilities.isDigit(c)) { // Single-digit command-line argument ("%1").
|
||||
} else if (RSyntaxUtilities.isDigit(c)) { // Single-digit command-line argument ("%1").
|
||||
addToken(text, currentTokenStart, i, Token.VARIABLE, newStartOffset + currentTokenStart);
|
||||
currentTokenType = Token.NULL;
|
||||
break;
|
||||
}
|
||||
else { // Anything else, ???.
|
||||
} else { // Anything else, ???.
|
||||
addToken(text, currentTokenStart, i - 1, Token.VARIABLE, newStartOffset + currentTokenStart); // ???
|
||||
i--;
|
||||
currentTokenType = Token.NULL;
|
||||
|
|
Loading…
Reference in New Issue