Просмотр исходного кода

types/persist: omit Persist.AttestationKey based on IsZero (#18241)

IsZero is required by the interface, so we should use that before trying
to serialize the key.

Updates #35412

Signed-off-by: Andrew Lytvynov <[email protected]>
Andrew Lytvynov 2 месяцев назад
Родитель
Сommit
ce7e1dea45
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      types/persist/persist.go

+ 1 - 1
types/persist/persist.go

@@ -26,7 +26,7 @@ type Persist struct {
 	UserProfile       tailcfg.UserProfile
 	NetworkLockKey    key.NLPrivate
 	NodeID            tailcfg.StableNodeID
-	AttestationKey    key.HardwareAttestationKey `json:",omitempty"`
+	AttestationKey    key.HardwareAttestationKey `json:",omitzero"`
 
 	// DisallowedTKAStateIDs stores the tka.State.StateID values which
 	// this node will not operate network lock on. This is used to