Skip to content

Commit debb2e6

Browse files
authored
Merge pull request #169 from kogisin/kogisin/108-improve-sim-tests
tests: add detailed and randomized cases for public plan proposals simulation
2 parents 31fe858 + c574fb6 commit debb2e6

File tree

7 files changed

+101
-86
lines changed

7 files changed

+101
-86
lines changed

app/params/weights.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const (
88
DefaultWeightMsgUnstake int = 30
99
DefaultWeightMsgHarvest int = 30
1010

11-
DefaultWeightAddPublicPlanProposal int = 10
11+
DefaultWeightAddPublicPlanProposal int = 5
1212
DefaultWeightUpdatePublicPlanProposal int = 5
1313
DefaultWeightDeletePublicPlanProposal int = 5
1414
)

x/farming/simulation/decoder.go

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,33 @@ func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string {
1818
case bytes.Equal(kvA.Key[:1], types.PlanKeyPrefix):
1919
var pA, pB types.BasePlan
2020
cdc.MustUnmarshal(kvA.Value, &pA)
21-
cdc.MustUnmarshal(kvA.Value, &pB)
21+
cdc.MustUnmarshal(kvB.Value, &pB)
2222
return fmt.Sprintf("%v\n%v", pA, pB)
2323

2424
case bytes.Equal(kvA.Key[:1], types.StakingKeyPrefix):
2525
var sA, sB types.Staking
2626
cdc.MustUnmarshal(kvA.Value, &sA)
27-
cdc.MustUnmarshal(kvA.Value, &sB)
27+
cdc.MustUnmarshal(kvB.Value, &sB)
2828
return fmt.Sprintf("%v\n%v", sA, sB)
2929

3030
case bytes.Equal(kvA.Key[:1], types.QueuedStakingKeyPrefix):
3131
var sA, sB types.QueuedStaking
3232
cdc.MustUnmarshal(kvA.Value, &sA)
33-
cdc.MustUnmarshal(kvA.Value, &sB)
33+
cdc.MustUnmarshal(kvB.Value, &sB)
3434
return fmt.Sprintf("%v\n%v", sA, sB)
3535

36-
//TODO: add f1 struct
36+
case bytes.Equal(kvA.Key[:1], types.HistoricalRewardsKeyPrefix):
37+
var rA, rB types.HistoricalRewards
38+
cdc.MustUnmarshal(kvA.Value, &rA)
39+
cdc.MustUnmarshal(kvB.Value, &rB)
40+
return fmt.Sprintf("%v\n%v", rA, rB)
41+
42+
case bytes.Equal(kvA.Key[:1], types.OutstandingRewardsKeyPrefix):
43+
var rA, rB types.OutstandingRewards
44+
cdc.MustUnmarshal(kvA.Value, &rA)
45+
cdc.MustUnmarshal(kvB.Value, &rB)
46+
return fmt.Sprintf("%v\n%v", rA, rB)
47+
3748
default:
3849
panic(fmt.Sprintf("invalid farming key prefix %X", kvA.Key[:1]))
3950
}

x/farming/simulation/decoder_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ func TestDecodeFarmingStore(t *testing.T) {
2020
basePlan := types.BasePlan{}
2121
staking := types.Staking{}
2222
queuedStaking := types.QueuedStaking{}
23+
historicalRewards := types.HistoricalRewards{}
24+
outstandingRewards := types.OutstandingRewards{}
2325

2426
kvPairs := kv.Pairs{
2527
Pairs: []kv.Pair{
2628
{Key: types.PlanKeyPrefix, Value: cdc.MustMarshal(&basePlan)},
2729
{Key: types.StakingKeyPrefix, Value: cdc.MustMarshal(&staking)},
2830
{Key: types.QueuedStakingKeyPrefix, Value: cdc.MustMarshal(&queuedStaking)},
29-
// TODO: f1 structs, indexes
31+
{Key: types.HistoricalRewardsKeyPrefix, Value: cdc.MustMarshal(&historicalRewards)},
32+
{Key: types.OutstandingRewardsKeyPrefix, Value: cdc.MustMarshal(&outstandingRewards)},
3033
{Key: []byte{0x99}, Value: []byte{0x99}},
3134
},
3235
}
@@ -38,6 +41,8 @@ func TestDecodeFarmingStore(t *testing.T) {
3841
{"Plan", fmt.Sprintf("%v\n%v", basePlan, basePlan)},
3942
{"Staking", fmt.Sprintf("%v\n%v", staking, staking)},
4043
{"QueuedStaking", fmt.Sprintf("%v\n%v", queuedStaking, queuedStaking)},
44+
{"HistoricalRewardsKeyPrefix", fmt.Sprintf("%v\n%v", historicalRewards, historicalRewards)},
45+
{"OutstandingRewardsKeyPrefix", fmt.Sprintf("%v\n%v", outstandingRewards, outstandingRewards)},
4146
{"other", ""},
4247
}
4348
for i, tt := range tests {

x/farming/simulation/operations.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,6 @@ func SimulateMsgHarvest(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Ke
315315
return func(
316316
r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
317317
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
318-
//
319-
// TODO: not fully implemented yet. It needs debugging why
320-
// there are no rewards although it processes queued coins and distribute rewards
321-
//
322-
323318
var simAccount simtypes.Account
324319

325320
// find staking from the simulated accounts

x/farming/simulation/operations_test.go

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func TestSimulateMsgUnstake(t *testing.T) {
187187
err := app.FarmingKeeper.Stake(ctx, accounts[0].Address, stakingCoins)
188188
require.NoError(t, err)
189189

190-
// begin a new block
190+
// begin a new block and advance epoch
191191
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}})
192192
err = app.FarmingKeeper.AdvanceEpoch(ctx)
193193
require.NoError(t, err)
@@ -217,60 +217,50 @@ func TestSimulateMsgHarvest(t *testing.T) {
217217
s := rand.NewSource(1)
218218
r := rand.New(s)
219219

220-
accounts := getTestingAccounts(t, r, app, ctx, 1)
220+
accounts := getTestingAccounts(t, r, app, ctx, 2)
221221

222222
// setup epoch days to 1 to ease the test
223223
params := app.FarmingKeeper.GetParams(ctx)
224224
params.NextEpochDays = 1
225225
app.FarmingKeeper.SetParams(ctx, params)
226226

227227
// setup a fixed amount plan
228-
msgPlan := &types.MsgCreateFixedAmountPlan{
229-
Name: "simulation",
230-
Creator: accounts[0].Address.String(),
231-
StakingCoinWeights: sdk.NewDecCoins(
232-
sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, sdk.NewDecWithPrec(10, 1)), // 100%
233-
),
234-
StartTime: types.ParseTime("0001-01-01T00:00:00Z"),
235-
EndTime: types.ParseTime("9999-01-01T00:00:00Z"),
236-
EpochAmount: sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 200_000_000)),
237-
}
238-
239228
_, err := app.FarmingKeeper.CreateFixedAmountPlan(
240229
ctx,
241-
msgPlan,
230+
&types.MsgCreateFixedAmountPlan{
231+
Name: "simulation-test",
232+
Creator: accounts[0].Address.String(),
233+
StakingCoinWeights: sdk.NewDecCoins(
234+
sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, sdk.NewDecWithPrec(10, 1)), // 100%
235+
),
236+
StartTime: types.ParseTime("0001-01-01T00:00:00Z"),
237+
EndTime: types.ParseTime("9999-01-01T00:00:00Z"),
238+
EpochAmount: sdk.NewCoins(
239+
sdk.NewInt64Coin("pool93E069B333B5ECEBFE24C6E1437E814003248E0DD7FF8B9F82119F4587449BA5", 300_000_000),
240+
),
241+
},
242242
accounts[0].Address,
243243
accounts[0].Address,
244244
types.PlanTypePrivate,
245245
)
246246
require.NoError(t, err)
247247

248-
// begin a new block
249-
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}})
250-
251-
// set staking
252-
stakingCoins := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 100_000_000))
253-
err = app.FarmingKeeper.Stake(ctx, accounts[0].Address, stakingCoins)
248+
// stake
249+
err = app.FarmingKeeper.Stake(ctx, accounts[1].Address, sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 100_000_000)))
254250
require.NoError(t, err)
255251

256-
queuedStaking, found := app.FarmingKeeper.GetQueuedStaking(ctx, sdk.DefaultBondDenom, accounts[0].Address)
257-
require.Equal(t, true, found)
258-
require.Equal(t, true, queuedStaking.Amount.IsPositive())
252+
_, qsf := app.FarmingKeeper.GetQueuedStaking(ctx, sdk.DefaultBondDenom, accounts[1].Address)
253+
require.True(t, qsf)
259254

260-
// begin a new block
255+
// begin a new block and advance epoch
261256
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}})
262257
err = app.FarmingKeeper.AdvanceEpoch(ctx)
263258
require.NoError(t, err)
264259

265260
// check that queue coins are moved to staked coins
266-
staking, found := app.FarmingKeeper.GetStaking(ctx, sdk.DefaultBondDenom, accounts[0].Address)
267-
require.Equal(t, true, found)
268-
require.Equal(t, true, staking.Amount.IsPositive())
269-
queuedStaking, found = app.FarmingKeeper.GetQueuedStaking(ctx, sdk.DefaultBondDenom, accounts[0].Address)
270-
require.Equal(t, false, found)
261+
_, sf := app.FarmingKeeper.GetStaking(ctx, sdk.DefaultBondDenom, accounts[1].Address)
262+
require.True(t, sf)
271263

272-
// begin a new block
273-
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}})
274264
err = app.FarmingKeeper.AdvanceEpoch(ctx)
275265
require.NoError(t, err)
276266

@@ -285,9 +275,12 @@ func TestSimulateMsgHarvest(t *testing.T) {
285275

286276
require.True(t, operationMsg.OK)
287277
require.Equal(t, types.TypeMsgHarvest, msg.Type())
288-
require.Equal(t, "cosmos1tnh2q55v8wyygtt9srz5safamzdengsnqeycj3", msg.Farmer)
278+
require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Farmer)
289279
require.Equal(t, []string{"stake"}, msg.StakingCoinDenoms)
290280
require.Len(t, futureOperations, 0)
281+
282+
balances := app.BankKeeper.GetBalance(ctx, accounts[1].Address, "pool93E069B333B5ECEBFE24C6E1437E814003248E0DD7FF8B9F82119F4587449BA5")
283+
require.Equal(t, sdk.NewInt64Coin("pool93E069B333B5ECEBFE24C6E1437E814003248E0DD7FF8B9F82119F4587449BA5", 100300000000), balances)
291284
}
292285

293286
func createTestApp(isCheckTx bool) (*farmingapp.FarmingApp, sdk.Context) {
@@ -304,7 +297,10 @@ func getTestingAccounts(t *testing.T, r *rand.Rand, app *farmingapp.FarmingApp,
304297
accounts := simtypes.RandomAccounts(r, n)
305298

306299
initAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 100_000_000_000)
307-
initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt))
300+
initCoins := sdk.NewCoins(
301+
sdk.NewCoin(sdk.DefaultBondDenom, initAmt),
302+
sdk.NewInt64Coin("pool93E069B333B5ECEBFE24C6E1437E814003248E0DD7FF8B9F82119F4587449BA5", 100_000_000_000),
303+
)
308304

309305
// add coins to the accounts
310306
for _, account := range accounts {

x/farming/simulation/proposals.go

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ import (
1212
"github.com/tendermint/farming/x/farming/types"
1313
)
1414

15-
/*
16-
[TODO]:
17-
We need to come up with better ways to simulate public plan proposals.
18-
Currently, the details are ignored and only basic logics are written to simulate.
19-
20-
These are some of the following considerations that i think need to be discussed and addressed:
21-
1. Randomize staking coin weights (single or multiple denoms)
22-
2. Simulate multiple proposals (add new weighted proposal content for multiple plans?)
23-
*/
24-
2515
// Simulation operation weights constants.
2616
const (
2717
OpWeightSimulateAddPublicPlanProposal = "op_weight_add_public_plan_proposal"
@@ -50,7 +40,7 @@ func ProposalContents(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keep
5040
}
5141
}
5242

53-
// SimulateAddPublicPlanProposal generates random public plan proposal content
43+
// SimulateAddPublicPlanProposal generates random public add plan proposal content.
5444
func SimulateAddPublicPlanProposal(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn {
5545
return func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) simtypes.Content {
5646
simAccount, _ := simtypes.RandomAcc(r, accs)
@@ -69,29 +59,19 @@ func SimulateAddPublicPlanProposal(ak types.AccountKeeper, bk types.BankKeeper,
6959
return nil
7060
}
7161

72-
// add request proposal
73-
req := &types.AddPlanRequest{
74-
Name: "simulation-test-" + simtypes.RandStringOfLength(r, 5),
75-
FarmingPoolAddress: simAccount.Address.String(),
76-
TerminationAddress: simAccount.Address.String(),
77-
StakingCoinWeights: sdk.NewDecCoins(sdk.NewInt64DecCoin(sdk.DefaultBondDenom, 1)),
78-
StartTime: ctx.BlockTime(),
79-
EndTime: ctx.BlockTime().AddDate(0, 1, 0),
80-
EpochAmount: sdk.NewCoins(sdk.NewInt64Coin(poolCoins[r.Intn(3)].Denom, int64(simtypes.RandIntBetween(r, 10_000_000, 1_000_000_000)))),
81-
}
82-
addRequests := []*types.AddPlanRequest{req}
62+
addPlanReqs := ranAddPlanRequests(r, ctx, simAccount, poolCoins)
8363

8464
return types.NewPublicPlanProposal(
8565
simtypes.RandStringOfLength(r, 10),
8666
simtypes.RandStringOfLength(r, 100),
87-
addRequests,
67+
addPlanReqs,
8868
[]*types.ModifyPlanRequest{},
8969
[]*types.DeletePlanRequest{},
9070
)
9171
}
9272
}
9373

94-
// SimulateModifyPublicPlanProposal generates random public plan proposal content
74+
// SimulateModifyPublicPlanProposal generates random public modify plan proposal content.
9575
func SimulateModifyPublicPlanProposal(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn {
9676
return func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) simtypes.Content {
9777
simAccount, _ := simtypes.RandomAcc(r, accs)
@@ -112,32 +92,33 @@ func SimulateModifyPublicPlanProposal(ak types.AccountKeeper, bk types.BankKeepe
11292

11393
req := &types.ModifyPlanRequest{}
11494

115-
// TODO: decide which values of fields to randomize
11695
plans := k.GetPlans(ctx)
11796
for _, p := range plans {
11897
if p.GetType() == types.PlanTypePublic {
11998
startTime := ctx.BlockTime()
120-
endTime := startTime.AddDate(0, 1, 0)
99+
endTime := startTime.AddDate(0, simtypes.RandIntBetween(r, 1, 28), 0)
121100

122101
switch plan := p.(type) {
123102
case *types.FixedAmountPlan:
124103
req.PlanId = plan.GetId()
125-
req.Name = plan.GetName()
104+
req.Name = "simulation-test-" + simtypes.RandStringOfLength(r, 5)
126105
req.FarmingPoolAddress = plan.GetFarmingPoolAddress().String()
127106
req.TerminationAddress = plan.GetTerminationAddress().String()
128107
req.StakingCoinWeights = plan.GetStakingCoinWeights()
129108
req.StartTime = &startTime
130109
req.EndTime = &endTime
131-
req.EpochAmount = sdk.NewCoins(sdk.NewInt64Coin(poolCoins[r.Intn(3)].Denom, int64(simtypes.RandIntBetween(r, 10_000_000, 1_000_000_000))))
110+
req.EpochAmount = sdk.NewCoins(
111+
sdk.NewInt64Coin(poolCoins[r.Intn(3)].Denom, int64(simtypes.RandIntBetween(r, 10_000_000, 1_000_000_000))),
112+
)
132113
case *types.RatioPlan:
133114
req.PlanId = plan.GetId()
134-
req.Name = plan.GetName()
115+
req.Name = "simulation-test-" + simtypes.RandStringOfLength(r, 5)
135116
req.FarmingPoolAddress = plan.GetFarmingPoolAddress().String()
136117
req.TerminationAddress = plan.GetTerminationAddress().String()
137118
req.StakingCoinWeights = plan.GetStakingCoinWeights()
138119
req.StartTime = &startTime
139120
req.EndTime = &endTime
140-
req.EpochRatio = sdk.NewDecWithPrec(int64(simtypes.RandIntBetween(r, 1, 10)), 1)
121+
req.EpochRatio = sdk.NewDecWithPrec(int64(simtypes.RandIntBetween(r, 1, 5)), 1)
141122
}
142123
break
143124
}
@@ -147,19 +128,19 @@ func SimulateModifyPublicPlanProposal(ak types.AccountKeeper, bk types.BankKeepe
147128
return nil
148129
}
149130

150-
updateRequests := []*types.ModifyPlanRequest{req}
131+
modifyPlanReqs := []*types.ModifyPlanRequest{req}
151132

152133
return types.NewPublicPlanProposal(
153134
simtypes.RandStringOfLength(r, 10),
154135
simtypes.RandStringOfLength(r, 100),
155136
[]*types.AddPlanRequest{},
156-
updateRequests,
137+
modifyPlanReqs,
157138
[]*types.DeletePlanRequest{},
158139
)
159140
}
160141
}
161142

162-
// SimulateDeletePublicPlanProposal generates random public plan proposal content
143+
// SimulateDeletePublicPlanProposal generates random public delete plan proposal content.
163144
func SimulateDeletePublicPlanProposal(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.ContentSimulatorFn {
164145
return func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) simtypes.Content {
165146
simAccount, _ := simtypes.RandomAcc(r, accs)
@@ -187,14 +168,42 @@ func SimulateDeletePublicPlanProposal(ak types.AccountKeeper, bk types.BankKeepe
187168
return nil
188169
}
189170

190-
deleteRequest := []*types.DeletePlanRequest{req}
171+
deletePlanReqs := []*types.DeletePlanRequest{req}
191172

192173
return types.NewPublicPlanProposal(
193174
simtypes.RandStringOfLength(r, 10),
194175
simtypes.RandStringOfLength(r, 100),
195176
[]*types.AddPlanRequest{},
196177
[]*types.ModifyPlanRequest{},
197-
deleteRequest,
178+
deletePlanReqs,
198179
)
199180
}
200181
}
182+
183+
// ranAddPlanRequests returns randomized add request proposals.
184+
func ranAddPlanRequests(r *rand.Rand, ctx sdk.Context, simAccount simtypes.Account, poolCoins sdk.Coins) []*types.AddPlanRequest {
185+
ranProposals := make([]*types.AddPlanRequest, 0)
186+
187+
// Generate a random number of proposals with random values of each parameter
188+
for i := 0; i < simtypes.RandIntBetween(r, 1, 3); i++ {
189+
req := &types.AddPlanRequest{}
190+
req.Name = "simulation-test-" + simtypes.RandStringOfLength(r, 5)
191+
req.FarmingPoolAddress = simAccount.Address.String()
192+
req.TerminationAddress = simAccount.Address.String()
193+
req.StakingCoinWeights = sdk.NewDecCoins(sdk.NewInt64DecCoin(sdk.DefaultBondDenom, 1))
194+
req.StartTime = ctx.BlockTime()
195+
req.EndTime = ctx.BlockTime().AddDate(0, simtypes.RandIntBetween(r, 1, 28), 0)
196+
197+
// Generate a fixed amount plan if pseudo-random integer is an even number and
198+
// generate a ratio plan if it is an odd number
199+
if r.Int()%2 == 0 {
200+
req.EpochAmount = sdk.NewCoins(
201+
sdk.NewInt64Coin(poolCoins[r.Intn(3)].Denom, int64(simtypes.RandIntBetween(r, 10_000_000, 100_000_000))),
202+
)
203+
} else {
204+
req.EpochRatio = sdk.NewDecWithPrec(int64(simtypes.RandIntBetween(r, 1, 10)), 2) // 1% ~ 10%
205+
}
206+
ranProposals = append(ranProposals, req)
207+
}
208+
return ranProposals
209+
}

x/farming/simulation/proposals_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ func TestProposalContents(t *testing.T) {
4242
require.Equal(t, params.DefaultWeightDeletePublicPlanProposal, w2.DefaultWeight())
4343

4444
content0 := w0.ContentSimulatorFn()(r, ctx, accounts)
45-
46-
require.Equal(t, "yNhYFmBZHe", content0.GetTitle())
47-
require.Equal(t, "weXhSUkMhPjMaxKlMIJMOXcnQfyzeOcbWwNbeHVIkPZBSpYuLyYggwexjxusrBqDOTtGTOWeLrQKjLxzIivHSlcxgdXhhuTSkuxK", content0.GetDescription())
45+
require.Equal(t, "eOcbWwNbeH", content0.GetTitle())
46+
require.Equal(t, "AjEdlEWDODFRregDTqGNoFBIHxvimmIZwLfFyKUfEWAnNBdtdzDmTPXtpHRGdIbuucfTjOygZsTxPjfweXhSUkMhPjMaxKlMIJMO", content0.GetDescription())
4847
require.Equal(t, "farming", content0.ProposalRoute())
4948
require.Equal(t, "PublicPlan", content0.ProposalType())
5049

@@ -70,14 +69,14 @@ func TestProposalContents(t *testing.T) {
7069
require.NoError(t, err)
7170

7271
content1 := w1.ContentSimulatorFn()(r, ctx, accounts)
73-
require.Equal(t, "GNoFBIHxvi", content1.GetTitle())
74-
require.Equal(t, "TVpQoottZyPFfNOoMioXHRuFwMRYUiKvcWPkrayyTLOCFJlAyslDameIuqVAuxErqFPEWIScKpBORIuZqoXlZuTvAjEdlEWDODFR", content1.GetDescription())
72+
require.Equal(t, "OoMioXHRuF", content1.GetTitle())
73+
require.Equal(t, "REqrXZSGLqwTMcxHfWotDllNkIJPMbXzjDVjPOOjCFuIvTyhXKLyhUScOXvYthRXpPfKwMhptXaxIxgqBoUqzrWbaoLTVpQoottZ", content1.GetDescription())
7574
require.Equal(t, "farming", content1.ProposalRoute())
7675
require.Equal(t, "PublicPlan", content1.ProposalType())
7776

7877
content2 := w2.ContentSimulatorFn()(r, ctx, accounts)
79-
require.Equal(t, "MhptXaxIxg", content2.GetTitle())
80-
require.Equal(t, "MBcObErwgTDNGWnwQMUgFFSKtPDMEoEQCTKVREqrXZSGLqwTMcxHfWotDllNkIJPMbXzjDVjPOOjCFuIvTyhXKLyhUScOXvYthRX", content2.GetDescription())
78+
require.Equal(t, "wQMUgFFSKt", content2.GetTitle())
79+
require.Equal(t, "MwMANGoQwFnCqFrUGMCRZUGJKTZIGPyldsifauoMnJPLTcDHmilcmahlqOELaAUYDBuzsVywnDQfwRLGIWozYaOAilMBcObErwgT", content2.GetDescription())
8180
require.Equal(t, "farming", content2.ProposalRoute())
8281
require.Equal(t, "PublicPlan", content2.ProposalType())
8382
}

0 commit comments

Comments
 (0)