OSDN Git Service

Fix xpub copy error (#270)
authoryahtoo <yahtoo.ma@gmail.com>
Fri, 12 Jul 2019 08:56:31 +0000 (16:56 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 12 Jul 2019 08:56:31 +0000 (16:56 +0800)
protocol/bbft.go

index 888ce99..f865897 100644 (file)
@@ -168,7 +168,7 @@ func (c *Chain) ProcessBlockSignature(signature, xPub []byte, blockHash *bc.Hash
        // save the signature if the block is not exist
        if blockHeader == nil {
                var xPubKey chainkd.XPub
-               copy(xPub[:], xPub[:])
+               copy(xPubKey[:], xPub[:])
                if !xPubKey.Verify(blockHash.Bytes(), signature) {
                        return errInvalidSignature
                }