Skip to content

Commit ad2e588

Browse files
authored
Merge pull request #744 from tronprotocol/fix_applyBlock_khaos_remove_on_master
Fix apply block khaos remove on master
2 parents c964a11 + a6216c7 commit ad2e588

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import org.tron.core.exception.ItemNotFoundException;
5656
import org.tron.core.exception.RevokingStoreIllegalStateException;
5757
import org.tron.core.exception.TaposException;
58+
import org.tron.core.exception.TooBigTransactionException;
5859
import org.tron.core.exception.UnLinkedBlockException;
5960
import org.tron.core.exception.ValidateBandwidthException;
6061
import org.tron.core.exception.ValidateScheduleException;
@@ -708,9 +709,13 @@ public synchronized void pushBlock(final BlockCapsule block)
708709
applyBlock(newBlock);
709710
tmpDialog.commit();
710711
} catch (RevokingStoreIllegalStateException e) {
711-
logger.debug(e.getMessage(), e);
712-
}
712+
logger.error(e.getMessage(), e);
713+
} catch (Throwable throwable) {
714+
logger.error(throwable.getMessage(), throwable);
715+
khaosDb.removeBlk(block.getBlockId());
716+
throw throwable;
713717
}
718+
}
714719
logger.info("save block: " + newBlock);
715720
}
716721
}

0 commit comments

Comments
 (0)