diff --git a/initialization/initialization.go b/initialization/initialization.go index aa6e2e336..903d35fec 100644 --- a/initialization/initialization.go +++ b/initialization/initialization.go @@ -171,8 +171,8 @@ type Initializer struct { // these values are atomics so they can be read from multiple other goroutines safely // write is protected by mtx - nonceValue atomic.Pointer[[]byte] nonce atomic.Pointer[uint64] + nonceValue atomic.Pointer[[]byte] lastPosition atomic.Pointer[uint64] numLabelsWritten atomic.Uint64 @@ -681,13 +681,18 @@ func (init *Initializer) verifyMetadata(m *shared.PostMetadata) error { func (init *Initializer) saveMetadata() error { v := shared.PostMetadata{ + Version: 1, + NodeId: init.nodeId, CommitmentAtxId: init.commitmentAtxId, - LabelsPerUnit: init.cfg.LabelsPerUnit, - NumUnits: init.opts.NumUnits, - MaxFileSize: init.opts.MaxFileSize, - Nonce: init.nonce.Load(), - LastPosition: init.lastPosition.Load(), + + LabelsPerUnit: init.cfg.LabelsPerUnit, + NumUnits: init.opts.NumUnits, + MaxFileSize: init.opts.MaxFileSize, + Scrypt: init.opts.Scrypt, + + Nonce: init.nonce.Load(), + LastPosition: init.lastPosition.Load(), } if init.nonceValue.Load() != nil { v.NonceValue = *init.nonceValue.Load()