Browse Source

Setup CHashWriter stuff

Currently getting this:

[libsecp256k1] illegal argument: seckey != NULL
./src/hushd: line 75: 26970 Aborted                 (core dumped)
z_signmessage
Duke Leto 4 years ago
parent
commit
0bcd779fda
  1. 5
      src/wallet/rpcwallet.cpp

5
src/wallet/rpcwallet.cpp

@ -1013,7 +1013,10 @@ UniValue z_signmessage(const UniValue& params, bool fHelp, const CPubKey& mypk)
// sign the data with ECDSA
int rec = -1;
const uint256 hash;
CHashWriter sh(SER_GETHASH, 0);
sh << strMessageMagic;
sh << strMessage;
const uint256 hash = sh.GetHash();
secp256k1_context *sctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
//TODO: maybe make this error more useful than an assertion?
assert(sctx != NULL);

Loading…
Cancel
Save