Skip to content

Commit

Permalink
refactor(withdrawal_unlocker): retry in case get unlock tx error
Browse files Browse the repository at this point in the history
Avoid "lock" withdrawal cell
  • Loading branch information
zeroqn authored and jjyr committed May 9, 2022
1 parent 897ce80 commit d820157
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/block-producer/src/withdrawal_unlocker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ impl FinalizedWithdrawalUnlocker {
for (tx_hash, withdrawal_to_unlock) in self.unlock_txs.iter() {
match rpc_client.get_transaction_status(*tx_hash).await {
Err(err) => {
log::debug!("[unlock withdrawal] get unlock tx failed {}", err);
// Always drop this unlock tx and retry to avoid "lock" withdrawal cell
log::info!("[unlock withdrawal] get unlock tx failed {}, drop it", err);
drop_txs.push(*tx_hash);
}
Ok(None) => {
log::info!("[unlock withdrawal] dropped unlock tx {}", tx_hash.pack());
Expand Down

0 comments on commit d820157

Please sign in to comment.