File tree Expand file tree Collapse file tree
framework/src/main/java/org/tron/core/net Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -315,14 +315,16 @@ public void pushTransaction(TransactionCapsule trx) throws P2pException {
315315 }
316316
317317 public void validSignature (BlockCapsule block ) throws P2pException {
318+ boolean flag ;
318319 try {
319- if (!block .validateSignature (dbManager .getDynamicPropertiesStore (),
320- dbManager .getAccountStore ())) {
321- throw new P2pException (TypeEnum .BLOCK_SIGN_ERROR , "valid signature failed." );
322- }
323- } catch (ValidateSignatureException e ) {
320+ flag = block .validateSignature (dbManager .getDynamicPropertiesStore (),
321+ dbManager .getAccountStore ());
322+ } catch (Exception e ) {
324323 throw new P2pException (TypeEnum .BLOCK_SIGN_ERROR , e );
325324 }
325+ if (!flag ) {
326+ throw new P2pException (TypeEnum .BLOCK_SIGN_ERROR , "valid signature failed." );
327+ }
326328 }
327329
328330 public boolean validBlock (BlockCapsule block ) throws P2pException {
You can’t perform that action at this time.
0 commit comments