OSDN Git Service

fix ErrLoadKey in multi-sig witness (#506)
authorWangYifu <lbqds@cryptape.com>
Fri, 30 Mar 2018 11:58:24 +0000 (19:58 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 30 Mar 2018 11:58:24 +0000 (19:58 +0800)
blockchain/txbuilder/rawtxsig_witness.go
blockchain/txbuilder/signature_witness.go

index 0ea74f7..0d496fc 100755 (executable)
@@ -52,7 +52,7 @@ func (sw *RawTxSigWitness) sign(ctx context.Context, tpl *Template, index uint32
                sigBytes, err := signFn(ctx, keyID.XPub, path, tpl.Hash(index).Byte32(), auth)
                if err != nil {
                        log.WithField("err", err).Warningf("computing signature %d", i)
-                       return nil
+                       continue
                }
                sw.Sigs[i] = sigBytes
        }
index e0a3fa6..fee4822 100755 (executable)
@@ -98,7 +98,7 @@ func (sw *SignatureWitness) sign(ctx context.Context, tpl *Template, index uint3
                sigBytes, err := signFn(ctx, keyID.XPub, path, h, auth)
                if err != nil {
                        log.WithField("err", err).Warningf("computing signature %d", i)
-                       return nil
+                       continue
                }
                sw.Sigs[i] = sigBytes
        }