Skip to content

Instantly share code, notes, and snippets.

@kesar
Created January 20, 2019 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kesar/5d39b4db4ab25bf11814332b24558d6b to your computer and use it in GitHub Desktop.
Save kesar/5d39b4db4ab25bf11814332b24558d6b to your computer and use it in GitHub Desktop.
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
#include <nebula.stress/nebula.stress.hpp>
namespace nebula {
void stress::defer(uint32_t amount) {
require_auth(_self);
for (int i = 0; i < amount; i++) {
eosio::transaction txn{};
txn.actions.emplace_back(
eosio::permission_level(_self, "active"_n),
_self,
"stress2"_n,
std::make_tuple(i));
txn.delay_sec = 0;
//(sender_id, payer, replace_existed)
txn.send(i, _self, false);
}
}
void stress::stress2(uint32_t index) {
//require_auth(_self);
}
} /// namespace nebula
EOSIO_DISPATCH(nebula::stress, (defer)(stress2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment