Skip to content

Commit

Permalink
Merge pull request #1541 from tronprotocol/soliditynodedup
Browse files Browse the repository at this point in the history
Soliditynodedup
  • Loading branch information
huzhenyuan committed Sep 17, 2018
2 parents 0a9c357 + 37a398b commit 419129c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/tron/core/db/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,10 @@ public void pushVerifiedBlock(BlockCapsule block) throws ContractValidateExcepti
ContractExeException, ValidateSignatureException, AccountResourceInsufficientException,
TransactionExpirationException, TooBigTransactionException, DupTransactionException,
TaposException, ValidateScheduleException, ReceiptCheckErrException,
VMIllegalException, TooBigTransactionResultException {
VMIllegalException, TooBigTransactionResultException, UnLinkedBlockException,
NonCommonBlockException, BadNumberBlockException, BadBlockException {
block.generatedByMyself = true;
applyBlock(block);
pushBlock(block);
}

private void applyBlock(BlockCapsule block) throws ContractValidateException,
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/org/tron/program/SolidityNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@
import org.tron.core.exception.AccountResourceInsufficientException;
import org.tron.core.exception.BadBlockException;
import org.tron.core.exception.BadItemException;
import org.tron.core.exception.BadNumberBlockException;
import org.tron.core.exception.ContractExeException;
import org.tron.core.exception.ContractValidateException;
import org.tron.core.exception.DupTransactionException;
import org.tron.core.exception.NonCommonBlockException;
import org.tron.core.exception.ReceiptCheckErrException;
import org.tron.core.exception.TaposException;
import org.tron.core.exception.TooBigTransactionException;
import org.tron.core.exception.TooBigTransactionResultException;
import org.tron.core.exception.TransactionExpirationException;
import org.tron.core.exception.UnLinkedBlockException;
import org.tron.core.exception.VMIllegalException;
import org.tron.core.exception.ValidateScheduleException;
import org.tron.core.exception.ValidateSignatureException;
Expand Down Expand Up @@ -141,14 +144,16 @@ private void syncSolidityBlock() throws BadBlockException {
throw new BadBlockException("too big exception result");
} catch (TransactionExpirationException e) {
throw new BadBlockException("expiration exception");
// } catch (BadNumberBlockException e) {
// throw new BadBlockException("bad number exception");
// } catch (NonCommonBlockException e) {
// throw new BadBlockException("non common exception");
} catch (BadNumberBlockException e) {
throw new BadBlockException("bad number exception");
} catch (NonCommonBlockException e) {
throw new BadBlockException("non common exception");
} catch (ReceiptCheckErrException e) {
throw new BadBlockException("OutOfSlotTime Exception");
} catch (VMIllegalException e) {
throw new BadBlockException(e.getMessage());
} catch (UnLinkedBlockException e) {
throw new BadBlockException("unLink exception");
}

} else {
Expand Down

0 comments on commit 419129c

Please sign in to comment.