Skip to content

Commit 1fe15e9

Browse files
committed
more logging
Signed-off-by: Angelo De Caro <angelo.decaro@gmail.com> Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
1 parent 677d081 commit 1fe15e9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

token/services/ttx/accept.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ func (s *acceptView) respondToSignatureRequests(context view.Context) error {
104104
if err != nil {
105105
return errors.Wrapf(err, "failed collecting requests of signature")
106106
}
107+
if logger.IsEnabledFor(zapcore.DebugLevel) {
108+
logger.Debugf("respond to signature requests [%s][%d]", s.tx.ID(), len(requestsToBeSigned))
109+
}
107110

108111
session := context.Session()
109112
for i := 0; i < len(requestsToBeSigned); i++ {
@@ -174,13 +177,23 @@ func (s *acceptView) respondToSignatureRequests(context view.Context) error {
174177
}
175178

176179
if len(requestsToBeSigned) > 0 {
180+
if logger.IsEnabledFor(zapcore.DebugLevel) {
181+
logger.Debugf("wait the transaction to be sent back [%s]", s.tx.ID())
182+
}
177183
// expect again to receive a transaction
178184
tx, err := ReceiveTransaction(context)
179185
if err != nil {
180186
return errors.Wrapf(err, "expected to receive a transaction")
181187
}
182188
// TODO: check that the token requests match
183189
s.tx = tx
190+
if logger.IsEnabledFor(zapcore.DebugLevel) {
191+
logger.Debugf("wait the transaction to be sent back [%s], received", s.tx.ID())
192+
}
193+
} else {
194+
if logger.IsEnabledFor(zapcore.DebugLevel) {
195+
logger.Debugf("no need to wait the transaction to be sent back [%s]", s.tx.ID())
196+
}
184197
}
185198

186199
return nil

token/services/vault/query/query.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ func (e *Engine) PublicParams() ([]byte, error) {
287287
if err != nil {
288288
return nil, err
289289
}
290+
logger.Debugf("got public parameters with key [%s], length [%d]", setupKey, len(raw))
290291
return raw, nil
291292
}
292293

0 commit comments

Comments
 (0)