| 1357 | } |
| 1358 | |
| 1359 | void ProxyRunner::proxy_enable_disable(td::int64 value) { |
| 1360 | if (!is_initialized()) { |
| 1361 | return; |
| 1362 | } |
| 1363 | if (is_disabled_until_version_ > 0) { |
| 1364 | if (is_disabled_until_version_ < value) { |
| 1365 | is_disabled_until_version_ = value; |
| 1366 | } else { |
| 1367 | is_disabled_until_version_ = |
| 1368 | std::max<td::int64>(value, runner_config()->root_contract_config->params_version() + 1); |
| 1369 | } |
| 1370 | } else { |
| 1371 | if (value <= runner_config()->root_contract_config->params_version()) { |
| 1372 | return; |
| 1373 | } else { |
| 1374 | is_disabled_until_version_ = value; |
| 1375 | kv_->begin_transaction().ensure(); |
| 1376 | |
| 1377 | close_all(); |
| 1378 | config_to_db(runner_config()); |
| 1379 | |
| 1380 | kv_->commit_transaction().ensure(); |
| 1381 | CHECK(is_disabled()); |
| 1382 | } |
| 1383 | } |
| 1384 | } |
| 1385 | |
| 1386 | void ProxyRunner::run_withdraw() { |
| 1387 | if (running_withdraw_) { |
nothing calls this directly
no test coverage detected