use of com.radixdlt.atom.SubstateStore in project radixdlt by radixdlt.
the class RadixEngine method construct.
private TxBuilder construct(TxBuilderExecutable executable, Set<SubstateId> avoid) throws TxBuilderException {
synchronized (stateUpdateEngineLock) {
SubstateStore filteredStore = new SubstateStore() {
@Override
public CloseableCursor<RawSubstateBytes> openIndexedCursor(SubstateIndex<?> index) {
return engineStore.openIndexedCursor(index).filter(i -> !avoid.contains(SubstateId.fromBytes(i.getId())));
}
@Override
public Optional<RawSubstateBytes> get(SystemMapKey key) {
return engineStore.get(key);
}
};
var txBuilder = TxBuilder.newBuilder(filteredStore, constraintMachine.getDeserialization(), serialization, maxMessageLen);
executable.execute(txBuilder);
return txBuilder;
}
}
Aggregations