1
0
Fork 0
forked from lthn/blockchain

deprecated uint64_t get_amount_for_zero_pubkeys() removed, various compilation fixes

This commit is contained in:
sowle 2023-11-02 16:51:45 +01:00
parent 964968ded0
commit 96cde2ae07
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
3 changed files with 2 additions and 29 deletions

View file

@ -3829,33 +3829,6 @@ namespace currency
}
return sum_of_amount_commitments == amount * native_coin_asset_id_pt;
}
//---------------------------------------------------------------
// DEPRECATED, don't use -- sowle
uint64_t get_amount_for_zero_pubkeys(const transaction& tx)
{
uint64_t found_alias_reward = 0;
for (const auto& out : tx.vout)
{
VARIANT_SWITCH_BEGIN(out);
VARIANT_CASE_CONST(tx_out_bare, out)
if (out.target.type() != typeid(txout_to_key))
continue;
const txout_to_key& o = boost::get<txout_to_key>(out.target);
if (o.key == null_pkey)
found_alias_reward += out.amount;
VARIANT_CASE_CONST(tx_out_zarcanum, o)
//@#@
VARIANT_SWITCH_END();
}
#ifdef TESTNET
found_alias_reward = 10 * COIN;
#else
@#@ fix it for mainnet bui
#endif
return found_alias_reward;
}
//---------------------------------------------------------------
bool get_aliases_reward_account(account_public_address& acc)
{

View file

@ -1130,7 +1130,7 @@ bool simple_wallet::show_staking_history(const std::vector<std::string>& args)
}
}
tools::wallet2::transfer_container transfers;
tools::transfer_container transfers;
m_wallet->get_transfers(transfers);
uint64_t timestamp = 0;

View file

@ -11,7 +11,7 @@ int test_get_rand_outs()
currency::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::request req = AUTO_VAL_INIT(req);
currency::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::response rsp = AUTO_VAL_INIT(rsp);
req.use_forced_mix_outs = false;
req.outs_count = 10 + 1;
req.decoys_count = 10 + 1;
for (size_t i = 0; i != 50; i++)
req.amounts.push_back(COIN);