Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/main/java/org/tron/core/db/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,15 @@ public void eraseBlock() {
}
}

public void pushVerifiedBlock(BlockCapsule block) throws ContractValidateException,
ContractExeException, ValidateSignatureException, AccountResourceInsufficientException,
TransactionExpirationException, TooBigTransactionException, DupTransactionException, ReceiptException,
TaposException, ValidateScheduleException, TransactionTraceException, ReceiptCheckErrException,
UnsupportVMException, TooBigTransactionResultException {
block.generatedByMyself = true;
applyBlock(block);
}

private void applyBlock(BlockCapsule block) throws ContractValidateException,
ContractExeException, ValidateSignatureException, AccountResourceInsufficientException,
TransactionExpirationException, TooBigTransactionException, DupTransactionException, ReceiptException,
Expand Down
16 changes: 7 additions & 9 deletions src/main/java/org/tron/program/SolidityNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@
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.ReceiptException;
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.TransactionTraceException;
import org.tron.core.exception.UnLinkedBlockException;
import org.tron.core.exception.UnsupportVMException;
import org.tron.core.exception.ValidateScheduleException;
import org.tron.core.exception.ValidateSignatureException;
Expand Down Expand Up @@ -107,7 +104,8 @@ private void syncSolidityBlock() throws BadBlockException {
Block block = databaseGrpcClient.getBlock(lastSolidityBlockNum + 1);
try {
BlockCapsule blockCapsule = new BlockCapsule(block);
dbManager.pushBlock(blockCapsule);
dbManager.pushVerifiedBlock(blockCapsule);
//dbManager.pushBlock(blockCapsule);
for (TransactionCapsule trx : blockCapsule.getTransactions()) {
TransactionInfoCapsule ret;
try {
Expand All @@ -130,7 +128,7 @@ private void syncSolidityBlock() throws BadBlockException {
throw new BadBlockException("validate signature exception");
} catch (ContractValidateException e) {
throw new BadBlockException("ContractValidate exception");
} catch (ContractExeException | UnLinkedBlockException e) {
} catch (ContractExeException e) {
throw new BadBlockException("Contract Execute exception");
} catch (TaposException e) {
throw new BadBlockException("tapos exception");
Expand All @@ -142,12 +140,12 @@ 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 (BadNumberBlockException e) {
// throw new BadBlockException("bad number exception");
} catch (ReceiptException e) {
throw new BadBlockException("Receipt exception");
} catch (NonCommonBlockException e) {
throw new BadBlockException("non common exception");
// } catch (NonCommonBlockException e) {
// throw new BadBlockException("non common exception");
} catch (TransactionTraceException e) {
throw new BadBlockException("TransactionTrace Exception");
} catch (ReceiptCheckErrException e) {
Expand Down