Skip to content

Commit 43869f7

Browse files
authored
Merge pull request #55 from fiatjaf/fix/members-apply-single-action
Apply only the new management action instead of replaying the whole log
2 parents c0d0940 + 6c77ee7 commit 43869f7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pyramid/members.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,5 +505,9 @@ func appendActionToFile(action managementAction) error {
505505
return err
506506
}
507507

508-
return LoadManagement()
508+
// apply only the new action: replaying the whole file here would
509+
// re-apply all previous actions on top of the current state,
510+
// duplicating parent links on every append
511+
applyAction(action)
512+
return nil
509513
}

0 commit comments

Comments
 (0)