@@ -13,6 +13,7 @@ import (
13
13
"github.com/0chain/blobber/code/go/0chain.net/core/logging"
14
14
"github.com/0chain/blobber/code/go/0chain.net/core/node"
15
15
"github.com/0chain/blobber/code/go/0chain.net/core/transaction"
16
+ "go.uber.org/zap"
16
17
"gorm.io/gorm"
17
18
)
18
19
@@ -112,6 +113,7 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
112
113
a .StartTime = sa .StartTime
113
114
a .StorageVersion = uint8 (sa .StorageVersion )
114
115
a .OwnerSigningPublicKey = sa .OwnerSigningPublicKey
116
+ logging .Logger .Info ("OwnerSigningPublicKey" , zap .String ("OwnerSigningPublicKey" , a .OwnerSigningPublicKey ))
115
117
116
118
m := map [string ]interface {}{
117
119
"allocation_id" : a .ID ,
@@ -145,17 +147,18 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
145
147
err = Repo .Save (ctx , a )
146
148
} else {
147
149
updateMap := map [string ]interface {}{
148
- "tx" : a .Tx ,
149
- "expiration_date" : a .Expiration ,
150
- "owner_id" : a .OwnerID ,
151
- "owner_public_key" : a .OwnerPublicKey ,
152
- "repairer_id" : a .RepairerID ,
153
- "size" : a .TotalSize ,
154
- "finalized" : a .Finalized ,
155
- "time_unit" : a .TimeUnit ,
156
- "file_options" : a .FileOptions ,
157
- "start_time" : a .StartTime ,
158
- "blobber_size" : a .BlobberSize ,
150
+ "tx" : a .Tx ,
151
+ "expiration_date" : a .Expiration ,
152
+ "owner_id" : a .OwnerID ,
153
+ "owner_public_key" : a .OwnerPublicKey ,
154
+ "repairer_id" : a .RepairerID ,
155
+ "size" : a .TotalSize ,
156
+ "finalized" : a .Finalized ,
157
+ "time_unit" : a .TimeUnit ,
158
+ "file_options" : a .FileOptions ,
159
+ "start_time" : a .StartTime ,
160
+ "blobber_size" : a .BlobberSize ,
161
+ "owner_signing_public_key" : a .OwnerSigningPublicKey ,
159
162
}
160
163
161
164
updateOption := func (alloc * Allocation ) {
@@ -170,6 +173,7 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
170
173
alloc .FileOptions = a .FileOptions
171
174
alloc .StartTime = a .StartTime
172
175
alloc .BlobberSize = a .BlobberSize
176
+ alloc .OwnerSigningPublicKey = a .OwnerSigningPublicKey
173
177
}
174
178
err = Repo .UpdateAllocation (ctx , a , updateMap , updateOption )
175
179
}
0 commit comments