Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
### Fixes

* [3501](https://github.com/zeta-chain/node/pull/3501) - fix E2E test failure caused by nil `ConfirmationParams` for Solana and TON
* [3509](https://github.com/zeta-chain/node/pull/3509) - schedule Bitcoin TSS keysign on interval to avoid TSS keysign spam

### Tests

Expand Down
19 changes: 12 additions & 7 deletions zetaclient/chains/bitcoin/bitcoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@
chain := b.observer.Chain()
chainID := chain.ChainId
lookahead := b.observer.ChainParams().OutboundScheduleLookahead
// #nosec G115 positive
scheduleInterval := uint64(b.observer.ChainParams().OutboundScheduleInterval)

cctxList, _, err := b.observer.ZetacoreClient().ListPendingCCTX(ctx, chain)
if err != nil {
Expand Down Expand Up @@ -178,13 +180,16 @@
continue
}

go b.signer.TryProcessOutbound(
ctx,
cctx,
b.observer,
b.observer.ZetacoreClient(),
zetaHeight,
)
// schedule TSS keysign if retry interval has arrived
if nonce%scheduleInterval == zetaHeight%scheduleInterval {
go b.signer.TryProcessOutbound(
ctx,
cctx,
b.observer,
b.observer.ZetacoreClient(),
zetaHeight,
)
}

Check warning on line 192 in zetaclient/chains/bitcoin/bitcoin.go

View check run for this annotation

Codecov / codecov/patch

zetaclient/chains/bitcoin/bitcoin.go#L184-L192

Added lines #L184 - L192 were not covered by tests
}

return nil
Expand Down
Loading