Skip to content

Commit c4f4e1f

Browse files
authored
Merge pull request #781 from tronprotocol/develop
merge from develop
2 parents ad2e588 + 9cae056 commit c4f4e1f

File tree

112 files changed

+3767
-2371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+3767
-2371
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ addons:
99
ssh_known_hosts:
1010
- 47.93.9.236:22008
1111
skip_build:
12-
- README.md
12+
- README.md
1313
- LICENSE
1414
deploy:
1515
provider: script
@@ -18,3 +18,5 @@ deploy:
1818
branch: develop
1919
after_deploy:
2020
- ./gradlew stest
21+
22+

Chinese version of TRON Protocol document.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@
212212
`trx_num`:对应TRX数量——比如:_232241_
213213
`num`: 对应的自定义资产数目。
214214
`start_time`:开始时间——比如:_20170312_
215-
`end_time`:结束时间——比如:_20170512_
216-
`decav_ratio`:衰减速率。
215+
`end_time`:结束时间——比如:_20170512_
217216
`vote_score`:合约的评分——比如:_12343_
218217
`description`:合约的描述——比如:_”trondada”_
219218
`url`:合约的url地址链接。
@@ -225,8 +224,7 @@
225224
int32 trx_num = 6;

226225
int32 num = 8;

227226
int64 start_time = 9;

228-
int64 end_time = 10;

229-
int32 decay_ratio = 15;

227+
int64 end_time = 10;

230228
int32 vote_score = 16;

231229
bytes description = 20;

232230
bytes url = 21;


English version of TRON Protocol document.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@
213213
`trx_num`: the number of TRONIX – e.g._232241_.
214214
`num`: number of corresponding asset.
215215
`start_time`: the starting date of this contract – e.g._20170312_.
216-
`end_time`: the expiring date of this contract – e.g. _20170512_.
217-
`decay_ratio`: decay ratio.
216+
`end_time`: the expiring date of this contract – e.g. _20170512_.
218217
`vote_score`: the vote score of this contract received – e.g. _12343_.
219218
`description`: the description of this contract – e.g.”_trondada_”.
220219
`url`: the url of this contract – e.g. “_https://www.noonetrust.com_”.
@@ -227,7 +226,6 @@
227226
int32 num = 8;

228227
int64 start_time = 9;

229228
int64 end_time = 10;

230-
int32 decay_ratio = 15;

231229
int32 vote_score = 16;

232230
bytes description = 20;

233231
bytes url = 21;


README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Then, run `FullNode::main()` again.
271271
### Running multi-nodes
272272
273273
To run TRON on more than one node, you need to specify several seed nodes' IPs in `config.conf` in `seed.node.ip.list`:
274-
For private testnet, the IPs are allocated by yourself.
274+
For private test net, the IPs are allocated by yourself.
275275

276276
## Running a local node and connecting to the public testnet
277277

@@ -293,8 +293,6 @@ cd build/libs
293293
java -jar java-tron.jar
294294
```
295295

296-
It is almost the same as that does in the private testnet, except that the IPs in the `config.conf` are officially declared by TRON.
297-
298296
### Running a Super Node
299297

300298
* Use the executable JAR(Recommend the way)

build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ apply plugin: 'com.google.protobuf'
66
apply plugin: 'application'
77
apply plugin: 'checkstyle'
88
apply plugin: 'com.github.johnrengelman.shadow'
9+
apply plugin: "jacoco"
10+
911

1012
sourceCompatibility = 1.8
1113
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
@@ -33,6 +35,11 @@ def versions = [
3335
checkstyle: '8.7',
3436
]
3537

38+
jacoco {
39+
toolVersion = "0.8.1"
40+
}
41+
42+
3643
configurations {
3744
checkstyleConfig
3845

@@ -215,6 +222,10 @@ test {
215222
testLogging {
216223
exceptionFormat = 'full'
217224
}
225+
jacoco {
226+
append = false
227+
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
228+
}
218229
}
219230

220231
task stest(type:Test){

src/main/java/org/tron/common/overlay/client/WalletGrpcClient.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
import io.grpc.ManagedChannelBuilder;
66
import java.util.Optional;
77
import java.util.concurrent.TimeUnit;
8-
import org.tron.api.GrpcAPI.AccountList;
98
import org.tron.api.GrpcAPI.AssetIssueList;
109
import org.tron.api.GrpcAPI.BytesMessage;
1110
import org.tron.api.GrpcAPI.EmptyMessage;
1211
import org.tron.api.GrpcAPI.NodeList;
1312
import org.tron.api.GrpcAPI.NumberMessage;
1413
import org.tron.api.GrpcAPI.Return;
15-
import org.tron.api.GrpcAPI.WitnessList;
1614
import org.tron.api.WalletGrpc;
1715
import org.tron.protos.Contract;
1816
import org.tron.protos.Contract.AssetIssueContract;
@@ -88,31 +86,6 @@ public Block getBlock(long blockNum) {
8886
return walletBlockingStub.getBlockByNum(builder.build());
8987
}
9088

91-
public Optional<AccountList> listAccounts() {
92-
AccountList accountList = walletBlockingStub.listAccounts(EmptyMessage.newBuilder().build());
93-
if (accountList != null) {
94-
return Optional.of(accountList);
95-
}
96-
return Optional.empty();
97-
}
98-
99-
public Optional<WitnessList> listWitnesses() {
100-
WitnessList witnessList = walletBlockingStub.listWitnesses(EmptyMessage.newBuilder().build());
101-
if (witnessList != null) {
102-
return Optional.of(witnessList);
103-
}
104-
return Optional.empty();
105-
}
106-
107-
public Optional<AssetIssueList> getAssetIssueList() {
108-
AssetIssueList assetIssueList = walletBlockingStub
109-
.getAssetIssueList(EmptyMessage.newBuilder().build());
110-
if (assetIssueList != null) {
111-
return Optional.of(assetIssueList);
112-
}
113-
return Optional.empty();
114-
}
115-
11689
public Optional<NodeList> listNodes() {
11790
NodeList nodeList = walletBlockingStub
11891
.listNodes(EmptyMessage.newBuilder().build());
@@ -139,8 +112,4 @@ public AssetIssueContract getAssetIssueByName(String assetName) {
139112
return walletBlockingStub.getAssetIssueByName(request);
140113
}
141114

142-
public NumberMessage getTotalTransaction() {
143-
return walletBlockingStub.totalTransaction(EmptyMessage.newBuilder().build());
144-
}
145-
146115
}

0 commit comments

Comments
 (0)