File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 99 "google.golang.org/grpc/codes"
1010 "google.golang.org/grpc/status"
1111
12+ types "github.com/akash-network/akash-api/go/node/types/v1beta3"
13+
1214 "github.com/akash-network/provider"
1315 pmanifest "github.com/akash-network/provider/manifest"
1416)
@@ -24,6 +26,17 @@ func (l *leaseV1) SendManifest(ctx context.Context, r *leasev1.SendManifestReque
2426 m = r .GetManifest ()
2527 )
2628
29+ // HACK(andrewhare): Existing manifests expected service resource endpoints
30+ // to be JSON serialized as [] instead of null when determining the manifest
31+ // version hash. This forces Go to do the right thing.
32+ for g := range m {
33+ for s := range m [g ].Services {
34+ if len (m [g ].Services [s ].Resources .Endpoints ) == 0 {
35+ m [g ].Services [s ].Resources .Endpoints = make (types.Endpoints , 0 )
36+ }
37+ }
38+ }
39+
2740 err := l .c .Manifest ().Submit (ctx , id , m )
2841 if err == nil {
2942 return & leasev1.SendManifestResponse {}, nil
You can’t perform that action at this time.
0 commit comments