Skip to content

Commit 419129c

Browse files
authored
Merge pull request #1541 from tronprotocol/soliditynodedup
Soliditynodedup
2 parents 0a9c357 + 37a398b commit 419129c

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/main/java/org/tron/core/db/Manager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,10 @@ public void pushVerifiedBlock(BlockCapsule block) throws ContractValidateExcepti
603603
ContractExeException, ValidateSignatureException, AccountResourceInsufficientException,
604604
TransactionExpirationException, TooBigTransactionException, DupTransactionException,
605605
TaposException, ValidateScheduleException, ReceiptCheckErrException,
606-
VMIllegalException, TooBigTransactionResultException {
606+
VMIllegalException, TooBigTransactionResultException, UnLinkedBlockException,
607+
NonCommonBlockException, BadNumberBlockException, BadBlockException {
607608
block.generatedByMyself = true;
608-
applyBlock(block);
609+
pushBlock(block);
609610
}
610611

611612
private void applyBlock(BlockCapsule block) throws ContractValidateException,

src/main/java/org/tron/program/SolidityNode.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@
2626
import org.tron.core.exception.AccountResourceInsufficientException;
2727
import org.tron.core.exception.BadBlockException;
2828
import org.tron.core.exception.BadItemException;
29+
import org.tron.core.exception.BadNumberBlockException;
2930
import org.tron.core.exception.ContractExeException;
3031
import org.tron.core.exception.ContractValidateException;
3132
import org.tron.core.exception.DupTransactionException;
33+
import org.tron.core.exception.NonCommonBlockException;
3234
import org.tron.core.exception.ReceiptCheckErrException;
3335
import org.tron.core.exception.TaposException;
3436
import org.tron.core.exception.TooBigTransactionException;
3537
import org.tron.core.exception.TooBigTransactionResultException;
3638
import org.tron.core.exception.TransactionExpirationException;
39+
import org.tron.core.exception.UnLinkedBlockException;
3740
import org.tron.core.exception.VMIllegalException;
3841
import org.tron.core.exception.ValidateScheduleException;
3942
import org.tron.core.exception.ValidateSignatureException;
@@ -141,14 +144,16 @@ private void syncSolidityBlock() throws BadBlockException {
141144
throw new BadBlockException("too big exception result");
142145
} catch (TransactionExpirationException e) {
143146
throw new BadBlockException("expiration exception");
144-
// } catch (BadNumberBlockException e) {
145-
// throw new BadBlockException("bad number exception");
146-
// } catch (NonCommonBlockException e) {
147-
// throw new BadBlockException("non common exception");
147+
} catch (BadNumberBlockException e) {
148+
throw new BadBlockException("bad number exception");
149+
} catch (NonCommonBlockException e) {
150+
throw new BadBlockException("non common exception");
148151
} catch (ReceiptCheckErrException e) {
149152
throw new BadBlockException("OutOfSlotTime Exception");
150153
} catch (VMIllegalException e) {
151154
throw new BadBlockException(e.getMessage());
155+
} catch (UnLinkedBlockException e) {
156+
throw new BadBlockException("unLink exception");
152157
}
153158

154159
} else {

0 commit comments

Comments
 (0)