Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some function names in comment #734

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions claimtxman/monitor_compressed_txs.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (tm *MonitorCompressedTxs) getPendingTxs(ctx context.Context, dbTx pgx.Tx)
return NewPendingTxs(mTxs, groups, lastGroupID)
}

// monitorTxs process all pending monitored tx
// MonitorTxs process all pending monitored tx
func (tm *MonitorCompressedTxs) MonitorTxs(ctx context.Context) error {
dbTx, err := tm.storage.BeginDBTransaction(ctx)
if err != nil {
Expand Down Expand Up @@ -194,7 +194,7 @@ func (tm *MonitorCompressedTxs) Process(ctx context.Context, pendingTxs *Pending
return nil
}

// OnFinishClaimGroupTx is called when a claim tx is mined successful
// OnFinishClaimGroupTxSuccessful is called when a claim tx is mined successful
func (tm *MonitorCompressedTxs) OnFinishClaimGroupTxSuccessful(group *ctmtypes.MonitoredTxGroup, txIndex int) {
txHash := group.DbEntry.ClaimTxHistory.TxHashes[txIndex].TxHash
msg := fmt.Sprintf("group_id:%d , tx %s was mined successfully", group.DbEntry.GroupID, txHash.String())
Expand Down
2 changes: 1 addition & 1 deletion claimtxman/types/monitoredtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func (mTx *MonitoredTx) HistoryHashSlice() [][]byte {
return history
}

// IsCandidateForGroup returns true if the tx is a candidate to be grouped
// IsCandidateToBeGrouped returns true if the tx is a candidate to be grouped
func (mTx *MonitoredTx) IsCandidateToBeGrouped(ger common.Hash) bool {
return mTx.Status == MonitoredTxStatusCreated && len(mTx.History) == 0 && mTx.GroupID == nil && mTx.GlobalExitRoot == ger
}
2 changes: 1 addition & 1 deletion db/pgstorage/pgstorage_monitored_txs_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/lib/pq"
)

// GetLatestGroupID
// GetLatestMonitoredTxGroupID
func (p *PostgresStorage) GetLatestMonitoredTxGroupID(ctx context.Context, dbTx pgx.Tx) (uint64, error) {
const sql = `SELECT group_id FROM sync.monitored_txs_group ORDER BY group_id DESC LIMIT 1`
var groupID uint64
Expand Down