diff --git a/zetaclient/chains/bitcoin/observer/event.go b/zetaclient/chains/bitcoin/observer/event.go index ffc79916d7..a30d2ac507 100644 --- a/zetaclient/chains/bitcoin/observer/event.go +++ b/zetaclient/chains/bitcoin/observer/event.go @@ -151,8 +151,8 @@ func ValidateStandardMemo(memoStd memo.InboundMemo, chainID int64) error { return nil } -// CheckEventProcessability checks if the inbound event is processable -func (ob *Observer) CheckEventProcessability(event BTCInboundEvent) bool { +// IsEventProcessable checks if the inbound event is processable +func (ob *Observer) IsEventProcessable(event BTCInboundEvent) bool { // check if the event is processable switch result := event.Processability(); result { case clienttypes.InboundProcessabilityGood: diff --git a/zetaclient/chains/bitcoin/observer/event_test.go b/zetaclient/chains/bitcoin/observer/event_test.go index fd870731f8..77c1cd84be 100644 --- a/zetaclient/chains/bitcoin/observer/event_test.go +++ b/zetaclient/chains/bitcoin/observer/event_test.go @@ -302,7 +302,7 @@ func Test_ValidateStandardMemo(t *testing.T) { } } -func Test_CheckEventProcessability(t *testing.T) { +func Test_IsEventProcessable(t *testing.T) { // can use any bitcoin chain for testing chain := chains.BitcoinMainnet params := mocks.MockChainParams(chain.ChainId, 10) @@ -345,7 +345,7 @@ func Test_CheckEventProcessability(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - result := ob.CheckEventProcessability(tt.event) + result := ob.IsEventProcessable(tt.event) require.Equal(t, tt.result, result) }) } diff --git a/zetaclient/chains/bitcoin/observer/inbound.go b/zetaclient/chains/bitcoin/observer/inbound.go index 65f7b852af..12d7d15f46 100644 --- a/zetaclient/chains/bitcoin/observer/inbound.go +++ b/zetaclient/chains/bitcoin/observer/inbound.go @@ -349,7 +349,7 @@ func (ob *Observer) GetInboundVoteFromBtcEvent(event *BTCInboundEvent) *crosscha } // check if the event is processable - if !ob.CheckEventProcessability(*event) { + if !ob.IsEventProcessable(*event) { return nil } diff --git a/zetaclient/chains/bitcoin/signer/signer.go b/zetaclient/chains/bitcoin/signer/signer.go index c239627f22..cb960183b6 100644 --- a/zetaclient/chains/bitcoin/signer/signer.go +++ b/zetaclient/chains/bitcoin/signer/signer.go @@ -450,7 +450,7 @@ func (signer *Signer) TryProcessOutbound( if err != nil { logger.Warn(). Err(err). - Msgf("SignConnectorOnReceive error: nonce %d chain %d", outboundTssNonce, params.ReceiverChainId) + Msgf("SignWithdrawTx error: nonce %d chain %d", outboundTssNonce, params.ReceiverChainId) return } logger.Info(). diff --git a/zetaclient/chains/evm/observer/v2_inbound.go b/zetaclient/chains/evm/observer/v2_inbound.go index 9688851af6..45eadaa4fe 100644 --- a/zetaclient/chains/evm/observer/v2_inbound.go +++ b/zetaclient/chains/evm/observer/v2_inbound.go @@ -23,8 +23,8 @@ import ( "github.com/zeta-chain/node/zetaclient/zetacore" ) -// checkEventProcessability checks if the event is processable -func (ob *Observer) checkEventProcessability( +// IsEventProcessable checks if the event is processable +func (ob *Observer) IsEventProcessable( sender, receiver ethcommon.Address, txHash ethcommon.Hash, payload []byte, @@ -99,7 +99,7 @@ func (ob *Observer) ObserveGatewayDeposit(ctx context.Context, startBlock, toBlo } // check if the event is processable - if !ob.checkEventProcessability(event.Sender, event.Receiver, event.Raw.TxHash, event.Payload) { + if !ob.IsEventProcessable(event.Sender, event.Receiver, event.Raw.TxHash, event.Payload) { continue } @@ -247,7 +247,7 @@ func (ob *Observer) ObserveGatewayCall(ctx context.Context, startBlock, toBlock } // check if the event is processable - if !ob.checkEventProcessability(event.Sender, event.Receiver, event.Raw.TxHash, event.Payload) { + if !ob.IsEventProcessable(event.Sender, event.Receiver, event.Raw.TxHash, event.Payload) { continue } @@ -378,7 +378,7 @@ func (ob *Observer) ObserveGatewayDepositAndCall(ctx context.Context, startBlock } // check if the event is processable - if !ob.checkEventProcessability(event.Sender, event.Receiver, event.Raw.TxHash, event.Payload) { + if !ob.IsEventProcessable(event.Sender, event.Receiver, event.Raw.TxHash, event.Payload) { continue } diff --git a/zetaclient/chains/solana/observer/inbound.go b/zetaclient/chains/solana/observer/inbound.go index a560d6b9d0..66e6a88055 100644 --- a/zetaclient/chains/solana/observer/inbound.go +++ b/zetaclient/chains/solana/observer/inbound.go @@ -271,7 +271,7 @@ func (ob *Observer) BuildInboundVoteMsgFromEvent(event *clienttypes.InboundEvent } // check if the event is processable - if !ob.CheckEventProcessability(*event) { + if !ob.IsEventProcessable(*event) { return nil } @@ -305,8 +305,8 @@ func (ob *Observer) BuildInboundVoteMsgFromEvent(event *clienttypes.InboundEvent return msg } -// CheckEventProcessability checks if the inbound event is processable -func (ob *Observer) CheckEventProcessability(event clienttypes.InboundEvent) bool { +// IsEventProcessable checks if the inbound event is processable +func (ob *Observer) IsEventProcessable(event clienttypes.InboundEvent) bool { switch result := event.Processability(); result { case clienttypes.InboundProcessabilityGood: return true diff --git a/zetaclient/chains/solana/observer/inbound_test.go b/zetaclient/chains/solana/observer/inbound_test.go index c8028dc5ce..02c4a95efd 100644 --- a/zetaclient/chains/solana/observer/inbound_test.go +++ b/zetaclient/chains/solana/observer/inbound_test.go @@ -167,7 +167,7 @@ func Test_BuildInboundVoteMsgFromEvent(t *testing.T) { }) } -func Test_CheckEventProcessability(t *testing.T) { +func Test_IsEventProcessable(t *testing.T) { // parepare params chain := chains.SolanaDevnet params := sample.ChainParams(chain.ChainId) @@ -210,7 +210,7 @@ func Test_CheckEventProcessability(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - result := ob.CheckEventProcessability(tt.event) + result := ob.IsEventProcessable(tt.event) require.Equal(t, tt.result, result) }) }