fix(oracle): use ConsensusVersion constant instead of hardcoded value#257
Conversation
Fixes KiiChain#256 - Update ConsensusVersion constant from 1 to 6 - Change ConsensusVersion() function to return the constant - Makes oracle module consistent with other modules
WalkthroughThis pull request fixes an inconsistency in the oracle module where the Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Description
Found this weird bug in oracle module. There's a constant
ConsensusVersion = 1defined but it's never used anywhere. The function just returns hardcoded6instead.The problem:
const ConsensusVersion = 1(just sitting there doing nothing)func (AppModule) ConsensusVersion() uint64 { return 6 }(why hardcode this?)What I changed:
Now it's consistent with other modules like tokenfactory, rewards, and feeabstraction that properly use their ConsensusVersion constants.
Fixes #256
Type of change
How Has This Been Tested?
Checklist: