diff options
author | Michael Muré <batolettre@gmail.com> | 2022-08-01 17:16:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-01 17:16:45 +0200 |
commit | cd52872475f1b39f3fb6546606c1e78afb6c08e3 (patch) | |
tree | 9f04b1e1ee362e210e74aaa324d950058ed14bf2 /entity/dag/operation_pack.go | |
parent | 2ade8fb1d570ddcb4aedc9386af46d208b129daa (diff) | |
parent | 56966fec5562c3a0e23340d0fbe754626c3beb64 (diff) | |
download | git-bug-cd52872475f1b39f3fb6546606c1e78afb6c08e3.tar.gz |
Merge pull request #835 from MichaelMure/op-base
entity/dag: proper base operation for simplified implementation
Diffstat (limited to 'entity/dag/operation_pack.go')
-rw-r--r-- | entity/dag/operation_pack.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/entity/dag/operation_pack.go b/entity/dag/operation_pack.go index 9b42f9bf..b2973343 100644 --- a/entity/dag/operation_pack.go +++ b/entity/dag/operation_pack.go @@ -314,10 +314,15 @@ func unmarshallPack(def Definition, resolver identity.Resolver, data []byte) ([] for _, raw := range aux.Operations { // delegate to specialized unmarshal function - op, err := def.OperationUnmarshaler(author, raw, resolver) + op, err := def.OperationUnmarshaler(raw, resolver) if err != nil { return nil, nil, err } + // Set the id from the serialized data + op.setId(entity.DeriveId(raw)) + // Set the author, taken from the OperationPack + op.setAuthor(author) + ops = append(ops, op) } |