Skip to content

Commit 711be21

Browse files
committed
fix ibc ack
1 parent 9a9e315 commit 711be21

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

shared/src/block_result.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ impl TxAttributesType {
159159
.unwrap_or_default()
160160
.to_owned();
161161

162-
tracing::error!("{}", timeout_timestamp);
163-
164162
Some(Self::SendPacket(SendPacket {
165163
source_port,
166164
dest_port,

shared/src/transaction.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,16 @@ impl InnerTransaction {
311311
pub fn was_successful(&self) -> bool {
312312
self.exit_code == TransactionExitStatus::Applied
313313
}
314+
315+
pub fn is_ibc(&self) -> bool {
316+
matches!(
317+
self.kind,
318+
TransactionKind::IbcMsgTransfer(_)
319+
| TransactionKind::IbcTrasparentTransfer(_)
320+
| TransactionKind::IbcUnshieldingTransfer(_)
321+
| TransactionKind::IbcShieldingTransfer(_)
322+
)
323+
}
314324
}
315325

316326
#[derive(Debug, Clone)]

transactions/src/services/tx.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ pub fn get_ibc_packets(
1515
let mut ibc_txs = inner_txs
1616
.iter()
1717
.filter_map(|tx| {
18-
if matches!(
19-
tx.kind,
20-
TransactionKind::IbcMsgTransfer(Some(_))
21-
| TransactionKind::IbcTrasparentTransfer(_)
22-
| TransactionKind::IbcUnshieldingTransfer(_)
23-
| TransactionKind::IbcShieldingTransfer(_)
24-
) && tx.was_successful()
25-
{
18+
if tx.is_ibc() && tx.was_successful() {
2619
Some(tx.tx_id.clone())
2720
} else {
2821
None

0 commit comments

Comments
 (0)