47 auto c2 = control->accepted_block.connect([&](
const block_state_ptr& blk) {
48 aq_db.commit_block( blk);
54 const auto trace_ptr = create_account(tester_account);
55 aq_db.cache_transaction_trace(trace_ptr);
59 pars.
keys.emplace_back(get_public_key(tester_account,
"owner"));
60 const auto results = aq_db.get_accounts_by_authorizers(pars);
72 auto c = control->accepted_block.connect([&](
const block_state_ptr& blk) {
73 aq_db.commit_block( blk);
78 const auto& tester_account =
"tester"_n;
79 const string role =
"first";
81 create_account(tester_account);
84 (
"account", tester_account)
85 (
"permission",
"role"_n)
87 (
"auth",
authority(get_public_key(tester_account, role), 5))
89 aq_db.cache_transaction_trace(trace_ptr);
93 pars.
keys.emplace_back(get_public_key(tester_account, role));
94 const auto results = aq_db.get_accounts_by_authorizers(pars);
101 tester node_a(setup_policy::none);
102 tester node_b(setup_policy::none);
109 aq_db.commit_block( blk);
113 for (
int i = 0; i < 10; i++) {
118 const auto& tester_account =
"tester"_n;
119 const string role =
"first";
123 (
"account", tester_account)
124 (
"permission",
"role"_n)
128 aq_db.cache_transaction_trace(trace_ptr);
134 const auto pre_results = aq_db.get_accounts_by_authorizers(pars);
135 BOOST_TEST_REQUIRE(
find_account_auth(pre_results, tester_account,
"role"_n) ==
true);
142 const auto post_results = aq_db.get_accounts_by_authorizers(pars);
143 BOOST_TEST_REQUIRE(post_results.accounts.size() == 0);
148 tester node_a(setup_policy::none);
149 tester node_b(setup_policy::none);
156 aq_db.commit_block( blk);
160 for (
int i = 0; i < 10; i++) {
165 const auto& tester_account =
"tester"_n;
166 const auto& tester_account2 =
"tester2"_n;
167 const string role =
"first";
172 (
"account", tester_account)
173 (
"permission",
"role"_n)
177 aq_db.cache_transaction_trace(trace_ptr);
179 (
"account", tester_account2)
180 (
"permission",
"role"_n)
184 aq_db.cache_transaction_trace(trace_ptr2);
190 const auto pre_results = aq_db.get_accounts_by_authorizers(pars);
191 BOOST_TEST_REQUIRE(
find_account_auth(pre_results, tester_account,
"role"_n) ==
true);
198 (
"account", tester_account)
199 (
"permission",
"role"_n)
203 aq_db.cache_transaction_trace(trace_ptr3);
205 (
"account", tester_account2)
206 (
"permission",
"role"_n)
210 aq_db.cache_transaction_trace(trace_ptr4);
216 (
"account", tester_account)
217 (
"permission",
"role"_n)
221 aq_db.cache_transaction_trace(trace_ptr5);
223 (
"account", tester_account2)
224 (
"permission",
"role"_n)
228 aq_db.cache_transaction_trace(trace_ptr6);
233 const auto post_results = aq_db.get_accounts_by_authorizers(pars);
236 BOOST_TEST_REQUIRE(post_results.accounts.size() == 1);