Discard any uncommitted changes as a result of the higher weight chain detection

This commit is contained in:
CalDescent 2022-02-10 08:16:30 +00:00
parent 2637311ef5
commit a8c79b807b

View File

@ -343,6 +343,9 @@ public class BlockMinter extends Thread {
LOGGER.debug("Unable to check for a higher weight chain. Proceeding anyway..."); LOGGER.debug("Unable to check for a higher weight chain. Proceeding anyway...");
} }
// Discard any uncommitted changes as a result of the higher weight chain detection
repository.discardChanges();
// Clear variables that track low weight blocks // Clear variables that track low weight blocks
parentSignatureForLastLowWeightBlock = null; parentSignatureForLastLowWeightBlock = null;
timeOfLastLowWeightBlock = null; timeOfLastLowWeightBlock = null;