Skip to content

Commit

Permalink
update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
trungnotchung authored and sfroment committed Feb 19, 2025
1 parent 72ba4ae commit aede814
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/object/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,23 @@ export class DRPObject implements DRPObjectBase {
try {
this.validateVertex(vertex);
const preComputeLca = this.computeLCA(vertex.dependencies);
const drp = this._computeDRP(
vertex.dependencies,
preComputeLca,
vertex.operation.drpType === DrpType.DRP ? vertex.operation : undefined
);

if (this.drp) {
const drp = this._computeDRP(
vertex.dependencies,
preComputeLca,
vertex.operation.drpType === DrpType.DRP ? vertex.operation : undefined
);
this._setDRPState(vertex, preComputeLca, this._getDRPState(drp));
}

const acl = this._computeObjectACL(
vertex.dependencies,
preComputeLca,
vertex.operation.drpType === DrpType.ACL ? vertex.operation : undefined
);
this._setDRPState(vertex, preComputeLca, this._getDRPState(drp));
this._setObjectACLState(vertex, preComputeLca, this._getDRPState(acl));

this.hashGraph.addVertex(vertex);
this._initializeFinalityState(vertex.hash, acl);
newVertices.push(vertex);
Expand Down

0 comments on commit aede814

Please sign in to comment.