@@ -551,11 +551,11 @@ public TransactionCapsule createTransactionCapsule(com.google.protobuf.Message m
551
551
/**
552
552
* Broadcast a transaction.
553
553
*/
554
- public GrpcAPI .Return broadcastTransaction (Transaction signaturedTransaction ) {
554
+ public GrpcAPI .Return broadcastTransaction (Transaction signedTransaction ) {
555
555
GrpcAPI .Return .Builder builder = GrpcAPI .Return .newBuilder ();
556
- TransactionCapsule trx = new TransactionCapsule (signaturedTransaction );
556
+ TransactionCapsule trx = new TransactionCapsule (signedTransaction );
557
557
try {
558
- Message message = new TransactionMessage (signaturedTransaction .toByteArray ());
558
+ Message message = new TransactionMessage (signedTransaction .toByteArray ());
559
559
if (minEffectiveConnection != 0 ) {
560
560
if (tronNetDelegate .getActivePeer ().isEmpty ()) {
561
561
logger
@@ -686,7 +686,7 @@ public TransactionSignWeight getTransactionSignWeight(Transaction trx) {
686
686
}
687
687
if (permissionId != 0 ) {
688
688
if (permission .getType () != PermissionType .Active ) {
689
- throw new PermissionException ("Permission type is error " );
689
+ throw new PermissionException ("Permission type is wrong! " );
690
690
}
691
691
//check operations
692
692
if (!checkPermissionOprations (permission , contract )) {
@@ -1109,9 +1109,7 @@ public AssetIssueList getAssetIssueByAccount(ByteString accountAddress) {
1109
1109
AssetIssueList .Builder builder = AssetIssueList .newBuilder ();
1110
1110
assetIssueCapsuleList .stream ()
1111
1111
.filter (assetIssueCapsule -> assetIssueCapsule .getOwnerAddress ().equals (accountAddress ))
1112
- .forEach (issueCapsule -> {
1113
- builder .addAssetIssue (issueCapsule .getInstance ());
1114
- });
1112
+ .forEach (issueCapsule -> builder .addAssetIssue (issueCapsule .getInstance ()));
1115
1113
1116
1114
return builder .build ();
1117
1115
}
@@ -1249,9 +1247,7 @@ public AssetIssueContract getAssetIssueByName(ByteString assetName)
1249
1247
.stream ()
1250
1248
.filter (assetIssueCapsule -> assetIssueCapsule .getName ().equals (assetName ))
1251
1249
.forEach (
1252
- issueCapsule -> {
1253
- builder .addAssetIssue (issueCapsule .getInstance ());
1254
- });
1250
+ issueCapsule -> builder .addAssetIssue (issueCapsule .getInstance ()));
1255
1251
1256
1252
// check count
1257
1253
if (builder .getAssetIssueCount () > 1 ) {
@@ -1273,7 +1269,7 @@ public AssetIssueContract getAssetIssueByName(ByteString assetName)
1273
1269
// check count
1274
1270
if (builder .getAssetIssueCount () > 1 ) {
1275
1271
throw new NonUniqueObjectException (
1276
- "To get more than one asset, please use getAssetIssuebyid syntax" );
1272
+ "To get more than one asset, please use getAssetIssueById syntax" );
1277
1273
}
1278
1274
}
1279
1275
}
@@ -1297,9 +1293,7 @@ public AssetIssueList getAssetIssueListByName(ByteString assetName) {
1297
1293
AssetIssueList .Builder builder = AssetIssueList .newBuilder ();
1298
1294
assetIssueCapsuleList .stream ()
1299
1295
.filter (assetIssueCapsule -> assetIssueCapsule .getName ().equals (assetName ))
1300
- .forEach (issueCapsule -> {
1301
- builder .addAssetIssue (issueCapsule .getInstance ());
1302
- });
1296
+ .forEach (issueCapsule -> builder .addAssetIssue (issueCapsule .getInstance ()));
1303
1297
1304
1298
return builder .build ();
1305
1299
}
@@ -1473,7 +1467,7 @@ private IncrementalMerkleVoucherContainer createWitness(OutputPoint outPoint, Lo
1473
1467
//Get the tree in blockNum-1 position
1474
1468
byte [] treeRoot = dbManager .getMerkleTreeIndexStore ().get (blockNumber - 1 );
1475
1469
if (treeRoot == null ) {
1476
- throw new RuntimeException ("treeRoot is null,blockNumber:" + (blockNumber - 1 ));
1470
+ throw new RuntimeException ("treeRoot is null, blockNumber:" + (blockNumber - 1 ));
1477
1471
}
1478
1472
1479
1473
IncrementalMerkleTreeCapsule treeCapsule = dbManager .getMerkleTreeStore ()
@@ -1986,7 +1980,7 @@ public TransactionCapsule createShieldedTransactionWithoutSpendAuthSig(
1986
1980
try {
1987
1981
transactionCapsule = builder .buildWithoutAsk ();
1988
1982
} catch (ZksnarkException e ) {
1989
- logger .error ("createShieldedTransaction except , error is " + e .toString ());
1983
+ logger .error ("createShieldedTransaction exception , error is " + e .toString ());
1990
1984
throw new ZksnarkException (e .toString ());
1991
1985
}
1992
1986
return transactionCapsule ;
@@ -2368,7 +2362,7 @@ public Transaction callConstantContract(TransactionCapsule trxCap, Builder
2368
2362
ProgramResult result = context .getProgramResult ();
2369
2363
if (result .getException () != null ) {
2370
2364
RuntimeException e = result .getException ();
2371
- logger .warn ("Constant call has error {}" , e .getMessage ());
2365
+ logger .warn ("Constant call has an error {}" , e .getMessage ());
2372
2366
throw e ;
2373
2367
}
2374
2368
0 commit comments