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

Ensure some contraints and limits on pin/unpin code ids #1624

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Sep 13, 2023

Better validation for MsgPinCodes + MsgUnpinCodes

  • Prevent duplicate code ids
  • limit total number of code ids to 50

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #1624 (b72d182) into main (09b5008) will increase coverage by 0.06%.
Report is 7 commits behind head on main.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1624      +/-   ##
==========================================
+ Coverage   56.59%   56.66%   +0.06%     
==========================================
  Files          64       64              
  Lines        8755     8768      +13     
==========================================
+ Hits         4955     4968      +13     
  Misses       3414     3414              
  Partials      386      386              
Files Changed Coverage Δ
x/wasm/types/tx.go 49.37% <100.00%> (+1.68%) ⬆️

@alpe alpe requested a review from pinosu September 15, 2023 09:12
@alpe alpe marked this pull request as ready for review September 15, 2023 09:13
@@ -684,6 +694,7 @@ func (msg MsgRemoveCodeUploadParamsAddresses) ValidateBasic() error {
func checkDuplicatedAddresses(addresses []string) error {
index := map[string]struct{}{}
for _, addr := range addresses {
addr = strings.ToUpper(addr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@pinosu pinosu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@alpe alpe merged commit 7dba5c7 into main Sep 18, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants