Skip to content

Commit fa71203

Browse files
committed
Call new_blocks even though block verification queue is not empty
new_blocks was called when the block verification queue is empty. The purpose of the behavior is not clear. Maybe it was used to backpressure for block sync extension. Since we have another block sync flow control and tendermint assumes that new_blocks is always called, this commit changed the behavior of new_blocks to be always called.
1 parent 7206d35 commit fa71203

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/client/importer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ impl Importer {
144144
};
145145

146146
{
147-
if !imported_blocks.is_empty() && is_empty {
147+
if !imported_blocks.is_empty() {
148+
if !is_empty {
149+
ctrace!(CLIENT, "Call new_blocks even though block verification queue is not empty");
150+
}
148151
let (enacted, retracted) = self.calculate_enacted_retracted(&import_results);
149152
self.miner.chain_new_blocks(client, &imported_blocks, &invalid_blocks, &enacted, &retracted);
150153
client.new_blocks(&imported_blocks, &invalid_blocks, &enacted, &retracted, &[], duration);

0 commit comments

Comments
 (0)