Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'com.github.sherter.google-java-format' version '0.8'
id 'maven-publish'
}
println("Notice: current gradle version is " + gradle.gradleVersion)
Expand All @@ -18,7 +19,7 @@ ext {
commonsLang3Version = "3.1"
javapoetVersion = "1.7.0"
picocliVersion = "3.6.0"
nettyVersion = "4.1.50.Final"
nettyVersion = "4.1.53.Final"
nettySMSSLContextVersion = "1.2.0"
toml4jVersion = "0.7.2"
bcprovJDK15onVersion = "1.60"
Expand Down Expand Up @@ -60,9 +61,9 @@ allprojects {

// In this section you declare where to find the dependencies of your project
repositories {
mavenCentral()
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
}

dependencies {
Expand Down Expand Up @@ -159,6 +160,13 @@ sourceSets {
resources.srcDir file('src/integration-test/resources')
}
}

googleJavaFormat {
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
}

configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
package org.fisco.bcos.sdk.transaction.builder;

import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
import org.fisco.bcos.sdk.client.Client;
import org.fisco.bcos.sdk.transaction.model.gas.DefaultGasProvider;
import org.fisco.bcos.sdk.transaction.model.po.RawTransaction;

public class TransactionBuilderService implements TransactionBuilderInterface {

private SecureRandom secureRandom = new SecureRandom();
private Client client;

/**
Expand All @@ -45,7 +44,8 @@ public RawTransaction createTransaction(
BigInteger chainId,
BigInteger groupId,
String extraData) {
BigInteger randomId = new BigInteger(250, secureRandom);
Random r = ThreadLocalRandom.current();
BigInteger randomId = new BigInteger(250, r);
BigInteger blockLimit = client.getBlockLimit();
return RawTransaction.createTransaction(
randomId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ public Map<String, List<List<Object>>> decodeEvents(String abi, List<Logs> logs)
(name, events) -> {
for (ABIDefinition abiDefinition : events) {
ABIObjectFactory abiObjectFactory = new ABIObjectFactory();
ABIObject outputObject = abiObjectFactory.createEventInputObject(abiDefinition);
ABIObject outputObject =
abiObjectFactory.createEventInputObject(abiDefinition);
ABICodecObject abiCodecObject = new ABICodecObject();
for (Logs log : logs) {
String eventSignature =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public int getReturnCode() {
return returnCode;
}

/**
* @param returnCode the returnCode to set */
/** @param returnCode the returnCode to set */
public void setReturnCode(int returnCode) {
this.returnCode = returnCode;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/applicationContext-sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<entry key="keyStoreDir" value="account" />
<entry key="accountAddress" value="" />
<entry key="accountFileFormat" value="pem" />
<entry key="accountPassword" value="" />
<entry key="password" value="" />
<entry key="accountFilePath" value="" />
</map>
</property>
Expand Down