@@ -26,6 +26,7 @@ func (h *Handler) queryChannelTransfers(ctx context.Context) ([]*fpb.CCTransfer,
26
26
27
27
transfers := make ([]* fpb.CCTransfer , 0 )
28
28
bookmark := ""
29
+ h .log .Debugf ("query channel transfers from, channel %s" , h .chaincodeID )
29
30
30
31
for {
31
32
resp , err := executor .Query (
@@ -65,6 +66,7 @@ func (h *Handler) queryChannelTransfers(ctx context.Context) ([]*fpb.CCTransfer,
65
66
func (h * Handler ) createTransferFrom (ctx context.Context , request model.TransferRequest ) (model.StatusKind , error ) {
66
67
startTime := time .Now ()
67
68
69
+ h .log .Debugf ("create cc transfer from, channel %s, id %s, method %s" , h .chaincodeID , request .Transfer , request .Method )
68
70
doer , err := h .poolController .Executor (h .channel )
69
71
if err != nil {
70
72
return model .InternalErrorTransferStatus , errors .Errorf ("executor: %w" , err )
@@ -92,8 +94,8 @@ func (h *Handler) createTransferFrom(ctx context.Context, request model.Transfer
92
94
for _ , arg := range args {
93
95
tArgs = append (tArgs , string (arg ))
94
96
}
95
- h .log .Debugf ("transfer request arguments: %+v" , tArgs )
96
97
98
+ h .log .Debugf ("transfer request arguments: %+v" , tArgs )
97
99
_ , err = doer .Invoke (
98
100
ctx ,
99
101
channel.Request {
@@ -119,6 +121,8 @@ func (h *Handler) createTransferFrom(ctx context.Context, request model.Transfer
119
121
120
122
func (h * Handler ) createTransferTo (ctx context.Context , transfer * fpb.CCTransfer ) (model.StatusKind , error ) {
121
123
channelName := strings .ToLower (transfer .GetTo ())
124
+ h .log .Debugf ("create cc transfer to, channel %s, id %s" , channelName , transfer .GetId ())
125
+
122
126
if status , err := h .expandTO (ctx , channelName ); err != nil {
123
127
return status , err
124
128
}
@@ -150,6 +154,8 @@ func (h *Handler) createTransferTo(ctx context.Context, transfer *fpb.CCTransfer
150
154
}
151
155
152
156
func (h * Handler ) cancelTransferFrom (ctx context.Context , transferID string ) (model.StatusKind , error ) {
157
+ h .log .Debugf ("cancel cc transfer from, channel %s, id %s" , h .channel , transferID )
158
+
153
159
if err := h .invoke (ctx , h .channel , h .chaincodeID , model .TxCancelCCTransferFrom , transferID ); err != nil {
154
160
if strings .Contains (err .Error (), errTransferNotFound ) {
155
161
h .log .Error (errors .Errorf ("cancel transfer: %w" , err ))
@@ -163,6 +169,8 @@ func (h *Handler) cancelTransferFrom(ctx context.Context, transferID string) (mo
163
169
}
164
170
165
171
func (h * Handler ) commitTransferFrom (ctx context.Context , transferID string ) (model.StatusKind , error ) {
172
+ h .log .Debugf ("commit cc transfer from, channel %s, id %s" , h .channel , transferID )
173
+
166
174
if err := h .invoke (ctx , h .channel , h .chaincodeID , model .NbTxCommitCCTransferFrom , transferID ); err != nil {
167
175
if strings .Contains (err .Error (), errTransferNotFound ) {
168
176
h .log .Error (errors .Errorf ("commit transfer: %w" , err ))
@@ -175,6 +183,8 @@ func (h *Handler) commitTransferFrom(ctx context.Context, transferID string) (mo
175
183
}
176
184
177
185
func (h * Handler ) deleteTransferFrom (ctx context.Context , transferID string ) (model.StatusKind , error ) {
186
+ h .log .Debugf ("delete cc transfer from, channel %s, id %s" , h .channel , transferID )
187
+
178
188
if err := h .invoke (ctx , h .channel , h .chaincodeID , model .NbTxDeleteCCTransferFrom , transferID ); err != nil {
179
189
if strings .Contains (err .Error (), errTransferNotFound ) {
180
190
h .log .Error (errors .Errorf ("delete transfer: %w" , err ))
@@ -187,6 +197,8 @@ func (h *Handler) deleteTransferFrom(ctx context.Context, transferID string) (mo
187
197
}
188
198
189
199
func (h * Handler ) deleteTransferTo (ctx context.Context , channelName string , transferID string ) (model.StatusKind , error ) {
200
+ h .log .Debugf ("delete cc transfer to, channel %s, id %s" , channelName , transferID )
201
+
190
202
if err := h .invoke (ctx , channelName , channelName , model .NbTxDeleteCCTransferTo , transferID ); err != nil {
191
203
if strings .Contains (err .Error (), errTransferNotFound ) {
192
204
h .log .Error (errors .Errorf ("delete transfer: %w" , err ))
@@ -226,6 +238,7 @@ func (h *Handler) queryChannelTransferTo(ctx context.Context, channelName string
226
238
return false , errors .Errorf ("expand: %w" , err )
227
239
}
228
240
241
+ h .log .Debugf ("query channel transfer to, channel %s, id %s" , channelName , transferID )
229
242
_ , err = executor .Query (
230
243
ctx ,
231
244
channel.Request {
@@ -252,6 +265,7 @@ func (h *Handler) queryChannelTransferFrom(ctx context.Context, channelName stri
252
265
return false , errors .Errorf ("expand: %w" , err )
253
266
}
254
267
268
+ h .log .Debugf ("query channel transfer from, channel %s, id %s" , channelName , transferID )
255
269
_ , err = executor .Query (
256
270
ctx ,
257
271
channel.Request {
0 commit comments