File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -701,6 +701,8 @@ func (init *Initializer) saveMetadata() error {
701701}
702702
703703func (init * Initializer ) loadMetadata () (* shared.PostMetadata , error ) {
704- // TODO(mafa): migrate metadata if needed before loading it
704+ if err := MigratePoST (init .opts .DataDir , init .logger ); err != nil {
705+ return nil , err
706+ }
705707 return LoadMetadata (init .opts .DataDir )
706708}
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ var ErrStateMetadataFileMissing = errors.New("metadata file is missing")
1313type PostMetadata struct {
1414 Version int `json:",omitempty"`
1515
16- NodeId NodeID
17- CommitmentAtxId ATXID
16+ NodeId [] byte
17+ CommitmentAtxId [] byte
1818
1919 LabelsPerUnit uint64
2020 NumUnits uint32
@@ -58,6 +58,7 @@ func (n *NonceValue) UnmarshalJSON(data []byte) (err error) {
5858 return
5959}
6060
61+ // TODO(mafa): for version 2 of metadata use NodeID as type for NodeID.
6162type NodeID []byte
6263
6364func (n NodeID ) MarshalJSON () ([]byte , error ) {
@@ -73,6 +74,7 @@ func (n *NodeID) UnmarshalJSON(data []byte) (err error) {
7374 return
7475}
7576
77+ // TODO(mafa): for version 2 of metadata use ATXID as type for CommitmentAtxID.
7678type ATXID []byte
7779
7880func (a ATXID ) MarshalJSON () ([]byte , error ) {
You can’t perform that action at this time.
0 commit comments