Skip to content

Commit

Permalink
fix union set
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodolfo Miranda committed Aug 15, 2023
1 parent bf45703 commit 3f405b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion examples/integration-scripts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/keri/core/eventing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ export function rotate({
}

let newitsetdiff = new Set([...witset].filter(x => cutset.has(x)))
let newitset = new Set([...newitsetdiff, ..._adds])
let newitset = new Set()
newitsetdiff.forEach(newitset.add, newitset)
addset.forEach(newitset.add, newitset)

if (newitset.size != (witset.size - cutset.size + addset.size)) {
throw new Error(`Invalid member combination among wits = ${wits}, cuts = ${cuts}, and adds = ${adds}.`)
Expand Down

0 comments on commit 3f405b5

Please sign in to comment.