aboutsummaryrefslogtreecommitdiff
path: root/src/key.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-01-31 15:00:56 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-01-31 15:00:56 +0000
commit3617f117394285c87c395a0ccc92941977f97019 (patch)
tree94e7754310fdf9c92aa71b26e34291df1b30fe4a /src/key.cpp
parent4d661baf1aca4226d1c4ec89fe7e44c1f93f04da (diff)
Fix assertion in CKey::SignCompact
Diffstat (limited to 'src/key.cpp')
-rw-r--r--src/key.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/key.cpp b/src/key.cpp
index 80d6589a3c..9d982fc44f 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -246,7 +246,7 @@ bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig)
secp256k1_ecdsa_recoverable_signature sig;
int ret = secp256k1_ecdsa_sign_recoverable(secp256k1_context_sign, &sig, hash.begin(), begin(), secp256k1_nonce_function_rfc6979, nullptr);
assert(ret);
- secp256k1_ecdsa_recoverable_signature_serialize_compact(secp256k1_context_sign, &vchSig[1], &rec, &sig);
+ ret = secp256k1_ecdsa_recoverable_signature_serialize_compact(secp256k1_context_sign, &vchSig[1], &rec, &sig);
assert(ret);
assert(rec != -1);
vchSig[0] = 27 + rec + (fCompressed ? 4 : 0);