Skip to content

Commit

Permalink
check cache before calling RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 committed Aug 23, 2024
1 parent c140c4e commit e787e70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zetaclient/chains/evm/observer/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,10 @@ func (ob *Observer) ObserveTSSReceiveInBlockAndOutbound(ctx context.Context, blo
}
if ethcommon.HexToAddress(tx.From) == ob.TSS().EVMAddress() {
nonce := uint64(tx.Nonce)
if receipt, txx, ok := ob.checkConfirmedTx(ctx, tx.Hash, nonce); ok {
ob.SetTxNReceipt(nonce, receipt, txx)
if !ob.IsTxConfirmed(nonce) {
if receipt, txx, ok := ob.checkConfirmedTx(ctx, tx.Hash, nonce); ok {
ob.SetTxNReceipt(nonce, receipt, txx)

Check warning on line 802 in zetaclient/chains/evm/observer/inbound.go

View check run for this annotation

Codecov / codecov/patch

zetaclient/chains/evm/observer/inbound.go#L799-L802

Added lines #L799 - L802 were not covered by tests
}
}
}
}
Expand Down

0 comments on commit e787e70

Please sign in to comment.