From 7c71da56869424e22f41f9bf0c9b75edf6bfa222 Mon Sep 17 00:00:00 2001 From: javiersuweijie Date: Wed, 10 May 2023 15:12:02 +0800 Subject: [PATCH] updated comments --- x/staking/simulation/operations.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index 0587bf71550a..a74a3642bab9 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -392,7 +392,7 @@ func SimulateMsgUndelegate( break } } - // if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error + // if simaccount.PrivKey == nil, delegation address does not exist in accs. However, since smart contracts and module accounts can stake, we can ignore the error if simAccount.PrivKey == nil { return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "account private key is nil"), nil, nil } @@ -581,7 +581,7 @@ func SimulateMsgBeginRedelegate( } } - // if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error + // if simaccount.PrivKey == nil, delegation address does not exist in accs. However, since smart contracts and module accounts can stake, we can ignore the error if simAccount.PrivKey == nil { return simtypes.NoOpMsg(types.ModuleName, msgType, "account private key is nil"), nil, nil }