@@ -30,6 +30,7 @@ BlockArchiver::BlockArchiver(BlockHandle handle, td::actor::ActorId<ArchiveManag
3030}
3131
3232void BlockArchiver::start_up () {
33+ VLOG (VALIDATOR_DEBUG) << " started block archiver for " << handle_->id ().to_str ();
3334 if (handle_->id ().is_masterchain ()) {
3435 td::actor::send_closure (db_, &Db::get_block_state, handle_,
3536 [SelfId = actor_id (this ), archive = archive_](td::Result<td::Ref<ShardState>> R) {
@@ -46,6 +47,7 @@ void BlockArchiver::start_up() {
4647}
4748
4849void BlockArchiver::move_handle () {
50+ VLOG (VALIDATOR_DEBUG) << " move_handle" ;
4951 if (handle_->handle_moved_to_archive ()) {
5052 moved_handle ();
5153 } else {
@@ -58,6 +60,7 @@ void BlockArchiver::move_handle() {
5860}
5961
6062void BlockArchiver::moved_handle () {
63+ VLOG (VALIDATOR_DEBUG) << " moved_handle" ;
6164 CHECK (handle_->handle_moved_to_archive ());
6265 if (handle_->moved_to_archive ()) {
6366 finish_query ();
@@ -78,6 +81,7 @@ void BlockArchiver::moved_handle() {
7881}
7982
8083void BlockArchiver::got_proof (td::BufferSlice data) {
84+ VLOG (VALIDATOR_DEBUG) << " got_proof" ;
8185 auto P = td::PromiseCreator::lambda ([SelfId = actor_id (this )](td::Result<td::Unit> R) {
8286 R.ensure ();
8387 td::actor::send_closure (SelfId, &BlockArchiver::written_proof);
@@ -87,6 +91,7 @@ void BlockArchiver::got_proof(td::BufferSlice data) {
8791}
8892
8993void BlockArchiver::written_proof () {
94+ VLOG (VALIDATOR_DEBUG) << " written_proof" ;
9095 if (!handle_->inited_proof_link ()) {
9196 written_proof_link ();
9297 return ;
@@ -102,6 +107,7 @@ void BlockArchiver::written_proof() {
102107}
103108
104109void BlockArchiver::got_proof_link (td::BufferSlice data) {
110+ VLOG (VALIDATOR_DEBUG) << " got_proof_link" ;
105111 auto P = td::PromiseCreator::lambda ([SelfId = actor_id (this )](td::Result<td::Unit> R) {
106112 R.ensure ();
107113 td::actor::send_closure (SelfId, &BlockArchiver::written_proof_link);
@@ -111,6 +117,7 @@ void BlockArchiver::got_proof_link(td::BufferSlice data) {
111117}
112118
113119void BlockArchiver::written_proof_link () {
120+ VLOG (VALIDATOR_DEBUG) << " written_proof_link" ;
114121 if (!handle_->received ()) {
115122 written_block_data ();
116123 return ;
@@ -124,6 +131,7 @@ void BlockArchiver::written_proof_link() {
124131}
125132
126133void BlockArchiver::got_block_data (td::BufferSlice data) {
134+ VLOG (VALIDATOR_DEBUG) << " got_block_data" ;
127135 auto P = td::PromiseCreator::lambda ([SelfId = actor_id (this )](td::Result<td::Unit> R) {
128136 R.ensure ();
129137 td::actor::send_closure (SelfId, &BlockArchiver::written_block_data);
@@ -133,6 +141,7 @@ void BlockArchiver::got_block_data(td::BufferSlice data) {
133141}
134142
135143void BlockArchiver::written_block_data () {
144+ VLOG (VALIDATOR_DEBUG) << " written_block_data" ;
136145 handle_->set_moved_to_archive ();
137146
138147 auto P = td::PromiseCreator::lambda ([SelfId = actor_id (this )](td::Result<td::Unit> R) {
@@ -143,15 +152,16 @@ void BlockArchiver::written_block_data() {
143152}
144153
145154void BlockArchiver::finish_query () {
155+ VLOG (VALIDATOR_DEBUG) << " finished archiving block in " << timer_.elapsed () << " s" ;
146156 if (promise_) {
147157 promise_.set_value (td::Unit ());
148158 }
149159 stop ();
150160}
151161
152162void BlockArchiver::abort_query (td::Status reason) {
163+ VLOG (VALIDATOR_WARNING) << " failed to archive block " << handle_->id () << " : " << reason;
153164 if (promise_) {
154- VLOG (VALIDATOR_WARNING) << " failed to archive block " << handle_->id () << " : " << reason;
155165 promise_.set_error (std::move (reason));
156166 }
157167 stop ();
0 commit comments