use of com.radixdlt.constraintmachine.Particle in project radixdlt by radixdlt.
the class RecoverableSubstateVirtualShutdown method recover.
@Override
public SubstateOperation recover(Provider<RadixEngine<LedgerAndBFTProof>> radixEngineProvider) {
var radixEngine = radixEngineProvider.get();
var keyBuf = substateId.getVirtualKey().orElseThrow();
Particle substate;
try {
substate = radixEngine.getVirtualSubstateDeserialization().keyToSubstate(typeByte, keyBuf);
} catch (DeserializeException e) {
throw new IllegalStateException("Could not deserialize virtual substate.");
}
return new SubstateOperation(substate, substateId, false);
}
Aggregations