Created
November 12, 2019 13:27
-
-
Save jin10086/16e6f16b9149488eeae6123c03926b86 to your computer and use it in GitHub Desktop.
测试 触发延时操作
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <eosio/eosio.hpp> | |
#include <eosio/asset.hpp> | |
#include <eosio/singleton.hpp> | |
#include <eosio/transaction.hpp> | |
using namespace std; | |
using namespace eosio; | |
CONTRACT testonerror : public contract | |
{ | |
public: | |
using contract::contract; | |
ACTION b() | |
{ | |
check(false,"h"); | |
} | |
ACTION a() | |
{ | |
transaction out; | |
out.actions.emplace_back( permission_level{ _self, "active"_n }, _self, "b"_n | |
, std::make_tuple() ); | |
out.delay_sec = 2; | |
out.send(11, _self, true); | |
} | |
[[eosio::on_notify("*::onerror")]] | |
void onerror(ignore<uint128_t>, ignore<std::vector<char>> ) | |
{ | |
} | |
private: | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment