-
Notifications
You must be signed in to change notification settings - Fork 240
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
Problem: relayer doesn't make use of binding contract #1193
Conversation
Signed-off-by: mmsqe <[email protected]>
for methodName, _ := range irelayerABI.Methods { | ||
var methodID [4]byte | ||
copy(methodID[:], irelayerABI.Methods[methodName].ID[:4]) | ||
switch methodName { | ||
case CreateClient: | ||
relayerGasRequiredByMethod[methodID] = 200000 | ||
case RecvPacket, Acknowledgement: | ||
relayerGasRequiredByMethod[methodID] = 250000 | ||
case UpdateClient, UpgradeClient: | ||
relayerGasRequiredByMethod[methodID] = 400000 | ||
default: | ||
relayerGasRequiredByMethod[methodID] = 100000 | ||
} | ||
} |
Check failure
Code scanning / gosec
the value in the range statement should be _ unless copying a map: want: for key := range m Error
for methodName, _ := range irelayerABI.Methods { | ||
var methodID [4]byte | ||
copy(methodID[:], irelayerABI.Methods[methodName].ID[:4]) | ||
switch methodName { | ||
case CreateClient: | ||
relayerGasRequiredByMethod[methodID] = 200000 | ||
case RecvPacket, Acknowledgement: | ||
relayerGasRequiredByMethod[methodID] = 250000 | ||
case UpdateClient, UpgradeClient: | ||
relayerGasRequiredByMethod[methodID] = 400000 | ||
default: | ||
relayerGasRequiredByMethod[methodID] = 100000 | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1193 +/- ##
===========================================
+ Coverage 16.73% 36.43% +19.70%
===========================================
Files 79 116 +37
Lines 5766 10374 +4608
===========================================
+ Hits 965 3780 +2815
- Misses 4723 6220 +1497
- Partials 78 374 +296
|
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)