@@ -155,7 +155,7 @@ public class Wallet {
155155 private Manager dbManager ;
156156 @ Autowired
157157 private NodeManager nodeManager ;
158- private static String addressPreFixString = Constant .ADD_PRE_FIX_STRING_MAINNET ; //default testnet
158+ private static String addressPreFixString = Constant .ADD_PRE_FIX_STRING_MAINNET ;//default testnet
159159 private static byte addressPreFixByte = Constant .ADD_PRE_FIX_BYTE_MAINNET ;
160160
161161 private int minEffectiveConnection = Args .getInstance ().getMinEffectiveConnection ();
@@ -1179,13 +1179,13 @@ public NumberMessage getNextMaintenanceTime() {
11791179 return builder .build ();
11801180 }
11811181
1182- public Block getBlockById (ByteString BlockId ) {
1183- if (Objects .isNull (BlockId )) {
1182+ public Block getBlockById (ByteString blockId ) {
1183+ if (Objects .isNull (blockId )) {
11841184 return null ;
11851185 }
11861186 Block block = null ;
11871187 try {
1188- block = dbManager .getBlockStore ().get (BlockId .toByteArray ()).getInstance ();
1188+ block = dbManager .getBlockStore ().get (blockId .toByteArray ()).getInstance ();
11891189 } catch (StoreException e ) {
11901190 }
11911191 return block ;
@@ -1217,6 +1217,7 @@ public Transaction getTransactionById(ByteString transactionId) {
12171217 transactionCapsule = dbManager .getTransactionStore ()
12181218 .get (transactionId .toByteArray ());
12191219 } catch (StoreException e ) {
1220+ return null ;
12201221 }
12211222 if (transactionCapsule != null ) {
12221223 return transactionCapsule .getInstance ();
@@ -1233,6 +1234,7 @@ public TransactionInfo getTransactionInfoById(ByteString transactionId) {
12331234 transactionInfoCapsule = dbManager .getTransactionHistoryStore ()
12341235 .get (transactionId .toByteArray ());
12351236 } catch (StoreException e ) {
1237+ return null ;
12361238 }
12371239 if (transactionInfoCapsule != null ) {
12381240 return transactionInfoCapsule .getInstance ();
@@ -1264,6 +1266,7 @@ public Exchange getExchangeById(ByteString exchangeId) {
12641266 try {
12651267 exchangeCapsule = dbManager .getExchangeStoreFinal ().get (exchangeId .toByteArray ());
12661268 } catch (StoreException e ) {
1269+ return null ;
12671270 }
12681271 if (exchangeCapsule != null ) {
12691272 return exchangeCapsule .getInstance ();
0 commit comments