Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

4297 delegatebw with buyram #4635

Merged
merged 4 commits into from
Jul 17, 2018

Conversation

taokayan
Copy link
Contributor

@taokayan taokayan commented Jul 13, 2018

#4297 add --buyram parameter to delegatebw. This will helps the dead accounts(zero cpu/net stake, no available ram) to revive. But it needs to be executed in a fast producer node so that it can be finished within the cpu leeway limit(default 3ms).

command example:

./cleos system delegatebw a44444444444 a44444444444 "0.3000 EOS" "1.0000 EOS" --buyram "0.1000 EOS"

@alepacheco
Copy link

As far as I know, you could do two separate actions, the first buying ram for the account and then delegate the resources with the delegatebw action

wdump((act_payload));
send_actions({create_action({permission_level{from_str,config::active_name}}, config::system_account_name, N(delegatebw), act_payload)});
if (buy_ram_amount.length()) {
fc::variant act_payload = fc::mutable_variant_object()
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of duplicating this action in both sides of the branches can we assembly the vector of actions incrementally so that this action is always in it, the buyram is appended based on conditions and there is only a single call to send_actions with the result?

@wanderingbort wanderingbort merged commit 1e2bf1e into EOSIO:release/1.1 Jul 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants