}
sigBytes, err := signFn(ctx, keyID.XPub, path, h, auth)
if err != nil {
- log.WithField("err", err).Warningf("computing signature %d", i)
+ log.WithFields(log.Fields{"module": logModule, "err": err}).Warningf("computing signature %d", i)
continue
}
+
+ // This break is ordered to avoid signing transaction successfully only once for a multiple-sign account
+ // that consist of different keys by the same password. Exit immediately when the signature is success,
+ // it means that only one signature will be successful in the loop for this multiple-sign account.
sw.Sigs[i] = sigBytes
+ break
}
return nil
}