Skip to content

Commit

Permalink
fix: update transaction status from broadcast if already minedi (#3101)
Browse files Browse the repository at this point in the history
Update broadcast status if already mined
  • Loading branch information
stringhandler committed Jul 19, 2021
2 parents 92993d7 + 481e3b6 commit 32fe3d2
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,18 @@ where TBackend: TransactionBackend + 'static
.mine_completed_transaction(self.tx_id)
.await
.map_err(|e| TransactionServiceProtocolError::new(self.tx_id, TransactionServiceError::from(e)))?;
let _ = self
.resources
.event_publisher
.send(Arc::new(TransactionEvent::TransactionMined(self.tx_id)))
.map_err(|e| {
trace!(
target: LOG_TARGET,
"Error sending event because there are no subscribers: {:?}",
e
);
e
});
} else {
info!(
target: LOG_TARGET,
Expand Down

0 comments on commit 32fe3d2

Please sign in to comment.