Skip to content

Commit a23f433

Browse files
committed
add logs for signing key
1 parent f8d40d2 commit a23f433

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

code/go/0chain.net/blobbercore/allocation/protocol.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/0chain/blobber/code/go/0chain.net/core/logging"
1414
"github.com/0chain/blobber/code/go/0chain.net/core/node"
1515
"github.com/0chain/blobber/code/go/0chain.net/core/transaction"
16+
"go.uber.org/zap"
1617
"gorm.io/gorm"
1718
)
1819

@@ -112,6 +113,7 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
112113
a.StartTime = sa.StartTime
113114
a.StorageVersion = uint8(sa.StorageVersion)
114115
a.OwnerSigningPublicKey = sa.OwnerSigningPublicKey
116+
logging.Logger.Info("OwnerSigningPublicKey", zap.String("OwnerSigningPublicKey", a.OwnerSigningPublicKey))
115117

116118
m := map[string]interface{}{
117119
"allocation_id": a.ID,
@@ -145,17 +147,18 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
145147
err = Repo.Save(ctx, a)
146148
} else {
147149
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,
159162
}
160163

161164
updateOption := func(alloc *Allocation) {
@@ -170,6 +173,7 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
170173
alloc.FileOptions = a.FileOptions
171174
alloc.StartTime = a.StartTime
172175
alloc.BlobberSize = a.BlobberSize
176+
alloc.OwnerSigningPublicKey = a.OwnerSigningPublicKey
173177
}
174178
err = Repo.UpdateAllocation(ctx, a, updateMap, updateOption)
175179
}

0 commit comments

Comments
 (0)