Skip to content

Conversation

@yarkinwho
Copy link
Contributor

Resolve #834

Will target 2.1.

src/actions.cpp Outdated
balance_table.modify(balance_table.get(ingress_account.value), eosio::same_payer, [&](balance& b){
b.balance -= value_with_max_gas;
});
if (rc.gas_payer != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not deduct value_with_max_gas directly in one step here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because only the gas should be paid by the gas_payer, the value should be deducted from the caller's balance.

bool abort_on_failure = false;
bool enforce_chain_id = true;
bool allow_non_self_miner = true;
uint64_t gas_payer = 0;
Copy link
Contributor

@elmato elmato May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use std::optional<eosio::name> here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@yarkinwho yarkinwho merged commit 6ad7b2d into release/2.0 May 28, 2025
3 checks passed
@yarkinwho yarkinwho deleted the yarkin/call_other_payer_new branch May 28, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants