@@ -2194,6 +2194,9 @@ void ValidatorEngine::start_validator() {
21942194 }
21952195 }
21962196
2197+ if (shard_block_retainer_adnl_id_fullnode_) {
2198+ shard_block_retainer_adnl_id_ = ton::adnl::AdnlNodeIdShort{config_.full_node };
2199+ }
21972200 if (!shard_block_retainer_adnl_id_.is_zero ()) {
21982201 if (config_.adnl_ids .contains (shard_block_retainer_adnl_id_.pubkey_hash ())) {
21992202 td::actor::send_closure (validator_manager_, &ton::validator::ValidatorManagerInterface::add_shard_block_retainer,
@@ -5575,17 +5578,25 @@ int main(int argc, char *argv[]) {
55755578 acts.push_back ([&x, v]() { td::actor::send_closure (x, &ValidatorEngine::set_sync_shards_upto, v); });
55765579 return td::Status::OK ();
55775580 });
5578- p.add_checked_option (
5579- ' \0 ' , " shard-block-retainer" , " adnl id for shard block retainer (hex)" , [&](td::Slice arg) -> td::Status {
5580- td::Bits256 v;
5581- if (v.from_hex (arg) != 256 ) {
5582- return td::Status::Error (" invalid adnl-id" );
5583- }
5584- acts.push_back ([&x, v]() {
5585- td::actor::send_closure (x, &ValidatorEngine::set_shard_block_retainer_adnl_id, ton::adnl::AdnlNodeIdShort{v});
5586- });
5587- return td::Status::OK ();
5588- });
5581+ p.add_checked_option (' \0 ' , " shard-block-retainer" ,
5582+ " adnl id for shard block retainer (hex), or \" fullnode\" for full node id" ,
5583+ [&](td::Slice arg) -> td::Status {
5584+ if (arg == " fullnode" ) {
5585+ acts.push_back ([&x]() {
5586+ td::actor::send_closure (x, &ValidatorEngine::set_shard_block_retainer_adnl_id_fullnode);
5587+ });
5588+ } else {
5589+ td::Bits256 v;
5590+ if (v.from_hex (arg) != 256 ) {
5591+ return td::Status::Error (" invalid adnl-id" );
5592+ }
5593+ acts.push_back ([&x, v]() {
5594+ td::actor::send_closure (x, &ValidatorEngine::set_shard_block_retainer_adnl_id,
5595+ ton::adnl::AdnlNodeIdShort{v});
5596+ });
5597+ }
5598+ return td::Status::OK ();
5599+ });
55895600 auto S = p.run (argc, argv);
55905601 if (S.is_error ()) {
55915602 LOG (ERROR) << " failed to parse options: " << S.move_as_error ();
0 commit comments