110110import org .tron .common .utils .ByteUtil ;
111111import org .tron .common .utils .DecodeUtil ;
112112import org .tron .common .utils .Sha256Hash ;
113+ import org .tron .common .utils .StringUtil ;
113114import org .tron .common .utils .Utils ;
114115import org .tron .common .utils .WalletUtil ;
115116import org .tron .common .zksnark .IncrementalMerkleTreeContainer ;
@@ -583,7 +584,7 @@ public GrpcAPI.Return broadcastTransaction(Transaction signedTransaction) {
583584 .setMessage (ByteString .copyFromUtf8 ("Transaction expired" ))
584585 .build ();
585586 } catch (Exception e ) {
586- logger .error ( BROADCAST_TRANS_FAILED , txID , e . getMessage () );
587+ logger .warn ( "Broadcast transaction {} failed" , txID , e );
587588 return builder .setResult (false ).setCode (response_code .OTHER_ERROR )
588589 .setMessage (ByteString .copyFromUtf8 ("Error: " + e .getMessage ()))
589590 .build ();
@@ -1708,7 +1709,7 @@ public Proposal getProposalById(ByteString proposalId) {
17081709 proposalCapsule = chainBaseManager .getProposalStore ()
17091710 .get (proposalId .toByteArray ());
17101711 } catch (StoreException e ) {
1711- logger .error (e .getMessage ());
1712+ logger .warn (e .getMessage ());
17121713 }
17131714 if (proposalCapsule != null ) {
17141715 return proposalCapsule .getInstance ();
@@ -2626,7 +2627,7 @@ public TransactionInfoList getTransactionInfoByBlockNum(long blockNum) {
26262627 }
26272628 }
26282629 } catch (BadItemException | ItemNotFoundException e ) {
2629- logger .error (e .getMessage ());
2630+ logger .warn (e .getMessage ());
26302631 }
26312632
26322633 return transactionInfoList .build ();
@@ -2658,7 +2659,7 @@ public MarketOrder getMarketOrderById(ByteString orderId) {
26582659 try {
26592660 return marketOrderStore .get (orderId .toByteArray ()).getInstance ();
26602661 } catch (ItemNotFoundException e ) {
2661- logger .error ("orderId = " + orderId . toString () + " not found" );
2662+ logger .warn ("orderId = {} not found" , orderId );
26622663 throw new IllegalStateException ("order not found in store" );
26632664 }
26642665
@@ -2694,7 +2695,7 @@ public MarketOrderList getMarketOrderByAccount(ByteString accountAddress) {
26942695 marketOrderListBuilder
26952696 .addOrders (orderCapsule .getInstance ());
26962697 } catch (ItemNotFoundException e ) {
2697- logger .error ("orderId = " + orderId . toString () + " not found" );
2698+ logger .warn ("orderId = {} not found" , orderId );
26982699 throw new IllegalStateException ("order not found in store" );
26992700 }
27002701 }
@@ -3061,9 +3062,9 @@ public SmartContract getContract(GrpcAPI.BytesMessage bytesMessage) {
30613062 byte [] address = bytesMessage .getValue ().toByteArray ();
30623063 AccountCapsule accountCapsule = chainBaseManager .getAccountStore ().get (address );
30633064 if (accountCapsule == null ) {
3064- logger .error (
3065- "Get contract failed, the account does not exist or the account "
3066- + "does not have a code hash!" );
3065+ logger .warn (
3066+ "Get contract failed, the account {} does not exist or the account "
3067+ + "does not have a code hash!" , StringUtil . encode58Check ( address ) );
30673068 return null ;
30683069 }
30693070
@@ -3090,9 +3091,9 @@ public SmartContractDataWrapper getContractInfo(GrpcAPI.BytesMessage bytesMessag
30903091 byte [] address = bytesMessage .getValue ().toByteArray ();
30913092 AccountCapsule accountCapsule = chainBaseManager .getAccountStore ().get (address );
30923093 if (accountCapsule == null ) {
3093- logger .error (
3094- "Get contract failed, the account does not exist or the account does not have a code "
3095- + "hash!" );
3094+ logger .warn (
3095+ "Get contract failed, the account {} does not exist or the account does not have a code "
3096+ + "hash!" , StringUtil . encode58Check ( address ) );
30963097 return null ;
30973098 }
30983099
0 commit comments