Skip to content

Commit ef8fb91

Browse files
committed
clean up
1 parent 2c1da35 commit ef8fb91

File tree

13 files changed

+18
-47
lines changed

13 files changed

+18
-47
lines changed

bitcoin/crypto/adaptor/verify.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func verifySchnorrAdaptorSignature(sig *Signature, hash []byte, pubKey *secp256k
4949
// 9. Fail if is_infinite(R)
5050
// 10. EAP = AR - R if has_even_y(AR) else AR + R; Fail if is_infinite(EAP)
5151
// 11. Fail if EAP != AP
52-
// 12. Return success iff not failure occured before reaching this
52+
// 12. Return success iff not failure occurred before reaching this
5353
// point.
5454

5555
// Step 1.
@@ -181,6 +181,6 @@ func verifySchnorrAdaptorSignature(sig *Signature, hash []byte, pubKey *secp256k
181181

182182
// Step 12.
183183
//
184-
// Return success iff not failure occured before reaching this
184+
// Return success iff not failure occurred before reaching this
185185
return nil
186186
}

x/btcbridge/types/msg_complete_dkg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (m *MsgCompleteDKG) ValidateBasic() error {
3434
}
3535

3636
if len(m.Vaults) == 0 {
37-
return errorsmod.Wrap(ErrInvalidDKGCompletionRequest, "vaults can not be empty")
37+
return errorsmod.Wrap(ErrInvalidDKGCompletionRequest, "vaults cannot be empty")
3838
}
3939

4040
vaults := make(map[string]bool)

x/btcbridge/types/msg_submit_signatures.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ func (msg *MsgSubmitSignatures) ValidateBasic() error {
3030
}
3131

3232
if len(msg.Txid) == 0 {
33-
return errorsmod.Wrap(ErrInvalidTxHash, "tx id can not be empty")
33+
return errorsmod.Wrap(ErrInvalidTxHash, "tx id cannot be empty")
3434
}
3535

3636
if _, err := chainhash.NewHashFromStr(msg.Txid); err != nil {
3737
return ErrInvalidTxHash
3838
}
3939

4040
if len(msg.Signatures) == 0 {
41-
return errorsmod.Wrap(ErrInvalidSignatures, "signatures can not be empty")
41+
return errorsmod.Wrap(ErrInvalidSignatures, "signatures cannot be empty")
4242
}
4343

4444
for _, signature := range msg.Signatures {

x/btcbridge/types/msg_update_trusted_fee_providers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (msg *MsgUpdateTrustedFeeProviders) ValidateBasic() error {
2424
}
2525

2626
if len(msg.FeeProviders) == 0 {
27-
return errorsmod.Wrapf(ErrInvalidFeeProviders, "fee providers can not be empty")
27+
return errorsmod.Wrapf(ErrInvalidFeeProviders, "fee providers cannot be empty")
2828
}
2929

3030
for _, provider := range msg.FeeProviders {

x/btcbridge/types/msg_update_trusted_non_btc_relayers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (msg *MsgUpdateTrustedNonBtcRelayers) ValidateBasic() error {
2424
}
2525

2626
if len(msg.Relayers) == 0 {
27-
return errorsmod.Wrapf(ErrInvalidRelayers, "relayers can not be empty")
27+
return errorsmod.Wrapf(ErrInvalidRelayers, "relayers cannot be empty")
2828
}
2929

3030
for _, relayer := range msg.Relayers {

x/dlc/types/params.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (p Params) Validate() error {
5656
}
5757

5858
if p.NonceGenerationBatchSize < 2 {
59-
return errorsmod.Wrapf(ErrInvalidParams, "nonce generation batch size can not be less than 2")
59+
return errorsmod.Wrapf(ErrInvalidParams, "nonce generation batch size cannot be less than 2")
6060
}
6161

6262
if p.NonceGenerationInterval <= 0 {
@@ -72,11 +72,11 @@ func (p Params) Validate() error {
7272
}
7373

7474
if len(p.AllowedOracleParticipants) > 0 && p.OracleParticipantNum > uint32(len(p.AllowedOracleParticipants)) {
75-
return errorsmod.Wrapf(ErrInvalidParams, "oracle participant number can not be greater than allowed oracle participant number %d", len(p.AllowedOracleParticipants))
75+
return errorsmod.Wrapf(ErrInvalidParams, "oracle participant number cannot be greater than allowed oracle participant number %d", len(p.AllowedOracleParticipants))
7676
}
7777

7878
if p.OracleParticipantNum < MinOracleParticipantNum {
79-
return errorsmod.Wrapf(ErrInvalidParams, "oracle participant number can not be less than min oracle participant number %d", MinOracleParticipantNum)
79+
return errorsmod.Wrapf(ErrInvalidParams, "oracle participant number cannot be less than min oracle participant number %d", MinOracleParticipantNum)
8080
}
8181

8282
if p.OracleParticipantThreshold == 0 || p.OracleParticipantThreshold > p.OracleParticipantNum {

x/lending/keeper/loan.go

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -189,35 +189,6 @@ func (k Keeper) GetLoansByOracle(ctx sdk.Context, oraclePubKey []byte, paginatio
189189
return loans, pageRes, nil
190190
}
191191

192-
// GetPendingLoans gets the requested or authorized loans
193-
func (k Keeper) GetPendingLoans(ctx sdk.Context) []*types.Loan {
194-
var loans []*types.Loan
195-
196-
requestedLoans := k.GetLoans(ctx, types.LoanStatus_Requested)
197-
if len(requestedLoans) != 0 {
198-
loans = append(loans, requestedLoans...)
199-
}
200-
201-
authorizedLoans := k.GetLoans(ctx, types.LoanStatus_Authorized)
202-
if len(authorizedLoans) != 0 {
203-
loans = append(loans, authorizedLoans...)
204-
}
205-
206-
return loans
207-
}
208-
209-
// GetLiquidatedLoans gets the liquidated loans from the liquidation queue
210-
func (k Keeper) GetLiquidatedLoans(ctx sdk.Context) []*types.Loan {
211-
var loans []*types.Loan
212-
213-
k.IterateLiquidationQueue(ctx, func(loan *types.Loan) (stop bool) {
214-
loans = append(loans, loan)
215-
return false
216-
})
217-
218-
return loans
219-
}
220-
221192
// GetAllLoans returns all loans
222193
func (k Keeper) GetAllLoans(ctx sdk.Context) []*types.Loan {
223194
var loans []*types.Loan

x/lending/keeper/msg_server_loan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (m msgServer) SubmitCets(goCtx context.Context, msg *types.MsgSubmitCets) (
188188
}
189189

190190
if collateralAmount.IsZero() {
191-
return nil, errorsmod.Wrap(types.ErrInsufficientCollateral, "collateral amount can not be zero")
191+
return nil, errorsmod.Wrap(types.ErrInsufficientCollateral, "collateral amount cannot be zero")
192192
}
193193

194194
// calculate liquidation price

x/lending/types/lending.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ func CheckBorrowCap(pool *LendingPool, borrowAmount sdkmath.Int) error {
225225
// CheckBorrowAmountLimit checks if the borrow amount satisfies limits for the given pool
226226
func CheckBorrowAmountLimit(pool *LendingPool, borrowAmount sdkmath.Int) error {
227227
if HasMinBorrowAmountLimit(pool) && borrowAmount.LT(pool.Config.MinBorrowAmount) {
228-
return errorsmod.Wrap(ErrInvalidAmount, "borrow amount can not be less than min borrow amount")
228+
return errorsmod.Wrap(ErrInvalidAmount, "borrow amount cannot be less than min borrow amount")
229229
}
230230

231231
if HasMaxBorrowAmountLimit(pool) && borrowAmount.GT(pool.Config.MaxBorrowAmount) {
232-
return errorsmod.Wrap(ErrInvalidAmount, "borrow amount can not be greater than max borrow amount")
232+
return errorsmod.Wrap(ErrInvalidAmount, "borrow amount cannot be greater than max borrow amount")
233233
}
234234

235235
return nil

x/lending/types/msg_submit_cets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (m *MsgSubmitCets) ValidateBasic() error {
4040
}
4141

4242
if len(m.DepositTxs) == 0 {
43-
return errorsmod.Wrap(ErrInvalidDepositTxs, "deposit txs can not be empty")
43+
return errorsmod.Wrap(ErrInvalidDepositTxs, "deposit txs cannot be empty")
4444
}
4545

4646
depositTxHashes := []string{}

0 commit comments

Comments
 (0)