Vested payouts in x/inference ignore caller funding module and always debit inference account #746
Summary
PayParticipantFromModule in x/inference hardcodes types.ModuleName (inference) when calling streamvesting.AddVestedRewards, instead of forwarding the caller-provided moduleName.
Affected code
inference-chain/x/inference/keeper/payment_handler.go
Expected behavior
When vesting is enabled, payouts should debit the same funding module passed to PayParticipantFromModule.
Actual behavior
The vested path always debits inference.
Impact
- Top miner vested payouts (
top_reward) can debit the wrong module account. - Can cause false insufficient-funds errors in
inference. - Can skew module-account accounting.
Repro
Call:
PayParticipantFromModule(..., moduleName=types.TopRewardPoolAccName, vestingPeriods>0)
and assert AddVestedRewards(..., types.TopRewardPoolAccName, ...).
Before fix it receives types.ModuleName instead.
Fix
In vested path:
AddVestedRewards(..., moduleName, ...)
instead of:
AddVestedRewards(..., types.ModuleName, ...).
💬 Comments (2)
@Schwartz10, have you noticed that the top reward module is not used?
🔄 Auto-synced from Issue #746 every hour.
PR with fix: #770 — forwards the caller-provided module name in vested payouts instead of hardcoding "inference".