use of com.radixdlt.application.unique.scrypt.MutexConstraintScrypt in project radixdlt by radixdlt.
the class NextEpochV2Test method setup.
@Before
public void setup() {
var cmAtomOS = new CMAtomOS();
cmAtomOS.load(new SystemConstraintScrypt());
scrypts.forEach(cmAtomOS::load);
// For v1 start
cmAtomOS.load(new MutexConstraintScrypt());
var cm = new ConstraintMachine(cmAtomOS.getProcedures(), cmAtomOS.buildSubstateDeserialization(), cmAtomOS.buildVirtualSubstateDeserialization());
this.parser = new REParser(cmAtomOS.buildSubstateDeserialization());
var serialization = cmAtomOS.buildSubstateSerialization();
this.store = new InMemoryEngineStore<>();
this.sut = new RadixEngine<>(parser, serialization, constructors, cm, store);
}
use of com.radixdlt.application.unique.scrypt.MutexConstraintScrypt in project radixdlt by radixdlt.
the class UniqueTest method setup.
@Before
public void setup() throws Exception {
var cmAtomOS = new CMAtomOS();
cmAtomOS.load(new MutexConstraintScrypt());
cmAtomOS.load(new SystemConstraintScrypt());
var cm = new ConstraintMachine(cmAtomOS.getProcedures(), cmAtomOS.buildSubstateDeserialization(), cmAtomOS.buildVirtualSubstateDeserialization());
this.parser = new REParser(cmAtomOS.buildSubstateDeserialization());
this.serialization = cmAtomOS.buildSubstateSerialization();
this.store = new InMemoryEngineStore<>();
this.sut = new RadixEngine<>(parser, serialization, REConstructor.newBuilder().put(CreateSystem.class, new CreateSystemConstructorV2()).build(), cm, store);
this.genesis = this.sut.construct(TxnConstructionRequest.create().action(new CreateSystem(0))).buildWithoutSignature();
this.sut.execute(List.of(genesis), null, PermissionLevel.SYSTEM);
}
Aggregations