Return early after duplicate commit is detected
Adds an early return in the event handler after we detect a duplicate
commit, so that we stop processing the event after that point.
@@ -202,6 +202,7 @@ impl EventHandler for DatabaseEventHandler<diesel::pg::PgConnection> {
"Commit {} at height {} is duplicate no action taken",
&commit.commit_id, commit.commit_num
);
+ return Ok(());
}
Ok(None) => {
info!("Received new commit {}", commit.commit_id);
