Browse Source

Fixes a bug where the unsigned transaction was logged by z_sendmany

after a successful sign and send, meaning that the logged hash fragment
would be different from the txid logged by "AddToWallet".  This issue
occured when sending from transparent addresses, as utxo inputs must be
signed.  It did not occur when sending from shielded addresses.
pull/4/head
Simon 8 years ago
parent
commit
4c1cd287be
  1. 6
      src/wallet/asyncrpcoperation_sendmany.cpp

6
src/wallet/asyncrpcoperation_sendmany.cpp

@ -776,6 +776,12 @@ void AsyncRPCOperation_sendmany::sign_send_raw_transaction(Object obj)
o.push_back(Pair("hex", signedtxn));
set_result(Value(o));
}
// Keep the signed transaction so we can hash to the same txid
CDataStream stream(ParseHex(signedtxn), SER_NETWORK, PROTOCOL_VERSION);
CTransaction tx;
stream >> tx;
tx_ = tx;
}

Loading…
Cancel
Save