B4 (2): a version a registry holds with other bytes ends the publish item at once, spending no try
Builds: design 47 H2 H-A-590 (2), H-A-589 (1), H-A-729, H-A-732
This commit is contained in:
@@ -62,6 +62,11 @@ func sendVia(call keptCaller) func(ctx context.Context, p versions.Publish) erro
|
||||
if err := json.Unmarshal(raw, &a); err != nil {
|
||||
return fmt.Errorf("%s answered what is no publish answer: %w", p.Seat, err)
|
||||
}
|
||||
// A version held with other bytes is answered, never failed (design 47 H2 H-A-729); it is read before the transfer, which is
|
||||
// absent exactly then (H-A-732).
|
||||
if a.OtherBytes != nil {
|
||||
return &versions.OtherBytes{Seat: p.Seat, Name: p.Name, Version: p.Version, Digest: a.OtherBytes.Digest, Fingerprint: a.OtherBytes.Fingerprint}
|
||||
}
|
||||
if len(a.Lacks) > 0 {
|
||||
return fmt.Errorf("%s%s holds %d of the parts of %s %s", versions.NotStoredWords, p.Seat, len(a.Lacks), p.Name, p.Version)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user