nex-protocols-go icon indicating copy to clipboard operation
nex-protocols-go copied to clipboard

Datastore struct fixes

Open ashquarky opened this issue 1 year ago • 2 comments
trafficstars

Adds missing StructureVersion checks in DataStoreSearchParam and DataStoreChangeMetaParam, based on the nintendo wiki. Fixes a swapped struct member in DataStoreMetaInfo. I understand these were automatically generated, so I'm not sure how a bug like that got in? Was it done intentionally and it's actually a library version issue? All discovered against PUYOPUYOTETRIS (NEX v3.5)

ashquarky avatar May 03 '24 12:05 ashquarky

Comments should be added documenting the structure version differences. For example: https://github.com/PretendoNetwork/nex-protocols-go/blob/b04c3e393e901f2901503e40c25a16d4a4209f46/service-item/team-kirby-clash-deluxe/types/service_item_get_balance_param.go#L16

Other than that, LGTM. I checked older versions and it seems that we've had the DataStoreMetaInfo structure order different than the order that we were reading/writing the fields (which was correct) https://github.com/PretendoNetwork/nex-protocols-go/blob/v1.0.58/datastore/types/datastore_meta_info.go

DaniElectra avatar May 03 '24 23:05 DaniElectra

I'll update this PR with the suggested changes within the next couple days

ashquarky avatar May 05 '24 02:05 ashquarky

LGTM

jonbarrow avatar Jun 22 '24 12:06 jonbarrow