1
0
Fork 0
forked from lthn/blockchain

currency_format_utils: added error check to lookup_acc_outs()

This commit is contained in:
sowle 2019-12-03 21:18:03 +03:00
parent 41a095dac9
commit 6af5dca26c
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -1595,7 +1595,8 @@ namespace currency
bool lookup_acc_outs(const account_keys& acc, const transaction& tx, const crypto::public_key& tx_pub_key, std::vector<size_t>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation)
{
money_transfered = 0;
generate_key_derivation(tx_pub_key, acc.m_view_secret_key, derivation);
bool r = generate_key_derivation(tx_pub_key, acc.m_view_secret_key, derivation);
CHECK_AND_ASSERT_MES(r, false, "unable to generate derivation from tx_pub = " << tx_pub_key << " * view_sec, invalid tx_pub?");
if (is_coinbase(tx) && get_block_height(tx) == 0 && tx_pub_key == ggenesis_tx_pub_key)
{