diff options
author | Michael Muré <batolettre@gmail.com> | 2021-04-08 16:25:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 16:25:22 +0200 |
commit | bc5f618eba812859bf87ce2c31b278bd518d4555 (patch) | |
tree | 6429e6c47de93660b16debfa244427e79e7aed85 /entity | |
parent | a3e098d76314fbb197a6fbd85d2e1df02c9e00fe (diff) | |
parent | 554992523574684ecce36d38bf5310bff52c8c03 (diff) | |
download | git-bug-bc5f618eba812859bf87ce2c31b278bd518d4555.tar.gz |
Merge pull request #628 from MichaelMure/entity-fix
cache: many fixes following the dag entity migration
Diffstat (limited to 'entity')
-rw-r--r-- | entity/dag/clock.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/entity/dag/clock.go b/entity/dag/clock.go index dc9bb72d..793fa1bf 100644 --- a/entity/dag/clock.go +++ b/entity/dag/clock.go @@ -9,7 +9,7 @@ import ( // ClockLoader is the repository.ClockLoader for Entity func ClockLoader(defs ...Definition) repository.ClockLoader { - clocks := make([]string, len(defs)*2) + clocks := make([]string, 0, len(defs)*2) for _, def := range defs { clocks = append(clocks, fmt.Sprintf(creationClockPattern, def.Namespace)) clocks = append(clocks, fmt.Sprintf(editClockPattern, def.Namespace)) @@ -18,8 +18,9 @@ func ClockLoader(defs ...Definition) repository.ClockLoader { return repository.ClockLoader{ Clocks: clocks, Witnesser: func(repo repository.ClockedRepo) error { - // We don't care about the actual identity so an IdentityStub will do - resolver := identity.NewStubResolver() + // we need to actually load the identities because of the commit signature check when reading, + // which require the full identities with crypto keys + resolver := identity.NewCachedResolver(identity.NewSimpleResolver(repo)) for _, def := range defs { // we actually just need to read all entities, |