diff --git a/node/pkg/governor/flow_cancel_tokens.go b/node/pkg/governor/flow_cancel_tokens.go index fb944c3a37..c4d95c150a 100644 --- a/node/pkg/governor/flow_cancel_tokens.go +++ b/node/pkg/governor/flow_cancel_tokens.go @@ -1,6 +1,6 @@ package governor -// FlowCancelTokenList Returns a list of `tokenConfigEntry`s representing tokens that can 'Flow Cancel'. This means that incoming transfers +// FlowCancelTokenList returns a list of `tokenConfigEntry`s representing tokens that can 'Flow Cancel'. This means that incoming transfers // that use these tokens can reduce the 'daily usage' of the Governor configured for the destination chain. // The list of tokens was generated by grepping the file `generated_mainnet_tokens.go` for "USDC", "USDT", and "DAI". // diff --git a/node/pkg/governor/governor.go b/node/pkg/governor/governor.go index f063cb23bd..5b7f3a9963 100644 --- a/node/pkg/governor/governor.go +++ b/node/pkg/governor/governor.go @@ -117,7 +117,7 @@ type ( } ) -// newTransferFromDbTransfer function  Perform a bounds check on dbTransfer.Value to ensure it can fit into int64. +// newTransferFromDbTransfer performs a bounds check on dbTransfer.Value to ensure it can fit into int64. // This should always be the case for normal operation as dbTransfer.Value represents the USD value of a transfer. func newTransferFromDbTransfer(dbTransfer *db.Transfer) (tx transfer, err error) { if dbTransfer.Value > math.MaxInt64 { @@ -126,7 +126,7 @@ func newTransferFromDbTransfer(dbTransfer *db.Transfer) (tx transfer, err error) return transfer{dbTransfer, int64(dbTransfer.Value)}, nil } -// addFlowCancelTransfer method  Appends a transfer to a ChainEntry's transfers property. +// addFlowCancelTransfer appends a transfer to a ChainEntry's transfers property. // SECURITY: The calling code is responsible for ensuring that the asset within the transfer is a flow-cancelling asset. // SECURITY: This method performs validation to ensure that the Flow Cancel transfer is valid. This is important to // ensure that the Governor usage cannot be lowered due to malicious or invalid transfers. @@ -153,7 +153,7 @@ func (ce *chainEntry) addFlowCancelTransfer(transfer transfer) error { return nil } -// addFlowCancelTransferFromDbTransfer method  Helper method to convert a dbTransfer to a transfer and add it to the +// addFlowCancelTransferFromDbTransfer converts a dbTransfer to a transfer and adds it to the // Chain Entry. // Validation of transfer data is performed by other methods: see addFlowCancelTransfer, newTransferFromDbTransfer. func (ce *chainEntry) addFlowCancelTransferFromDbTransfer(dbTransfer *db.Transfer) error { @@ -168,7 +168,7 @@ func (ce *chainEntry) addFlowCancelTransferFromDbTransfer(dbTransfer *db.Transfe return nil } -// inverse method Takes a transfer and returns a copy of that transfer with the +// inverse takes a transfer and returns a copy of that transfer with the // additive inverse of its Value property (i.e. flip the sign). func (t *transfer) inverse() transfer { return transfer{t.dbTransfer, -t.value} diff --git a/node/pkg/governor/governor_monitoring.go b/node/pkg/governor/governor_monitoring.go index 73733efcef..bf7850526c 100644 --- a/node/pkg/governor/governor_monitoring.go +++ b/node/pkg/governor/governor_monitoring.go @@ -241,7 +241,7 @@ func (gov *ChainGovernor) resetReleaseTimerForTime(vaaId string, now time.Time) return "", fmt.Errorf("vaa not found in the pending list") } -// sumValue function  Sums the value of all `transfers`. See also `TrimAndSumValue`. +// sumValue function sums the value of all `transfers`. See also `TrimAndSumValue`. func sumValue(transfers []transfer, startTime time.Time) uint64 { if len(transfers) == 0 { return 0 diff --git a/node/pkg/governor/governor_test.go b/node/pkg/governor/governor_test.go index 82d9583bad..8689a360d1 100644 --- a/node/pkg/governor/governor_test.go +++ b/node/pkg/governor/governor_test.go @@ -106,7 +106,7 @@ func (gov *ChainGovernor) setTokenForTesting( return nil } -// getStatsForAllChains method  Sums the number of transfers, value of all transfers, number of pending transfers, +// getStatsForAllChains sums the number of transfers, value of all transfers, number of pending transfers, // and the value of the pending transfers. // Note that 'flow cancel transfers' are not included and therefore the values returned by this function may not // match the Governor usage.