aboutsummaryrefslogtreecommitdiffstats
path: root/entity/dag/clock.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-04-04 13:28:21 +0200
committerMichael Muré <batolettre@gmail.com>2021-04-08 16:18:31 +0200
commit554992523574684ecce36d38bf5310bff52c8c03 (patch)
tree6429e6c47de93660b16debfa244427e79e7aed85 /entity/dag/clock.go
parenta3e098d76314fbb197a6fbd85d2e1df02c9e00fe (diff)
downloadgit-bug-554992523574684ecce36d38bf5310bff52c8c03.tar.gz
cache: many fixes following the dag entity migration
Diffstat (limited to 'entity/dag/clock.go')
-rw-r--r--entity/dag/clock.go7
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,