Skip to content

Commit

Permalink
Fix a minor error in SetBondRequirementRate test of Simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
goldworm committed Jun 13, 2024
1 parent d904fad commit 375ecfd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions icon/icsim/setbondrequirementrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ func assertBondRequirement(t *testing.T, sim Simulator, br, nextBr icmodule.Rate
term := sim.GetPRepTermInJSON()
networkInfo := sim.GetNetworkInfoInJSON()

if sim.Revision().Value() < icmodule.RevisionSetBondRequirementRate {
if term["revision"].(int) < icmodule.RevisionSetBondRequirementRate {
assert.Equal(t, br.Percent(), term["bondRequirement"])
assert.Equal(t, nextBr.Percent(), networkInfo["bondRequirement"])
} else {
assert.Equal(t, br.NumInt64(), term["bondRequirementRate"])
}
if sim.Revision().Value() < icmodule.RevisionSetBondRequirementRate {
assert.Equal(t, nextBr.Percent(), networkInfo["bondRequirement"])
} else {
assert.Equal(t, nextBr.NumInt64(), networkInfo["bondRequirementRate"])
}
}
Expand Down

0 comments on commit 375ecfd

Please sign in to comment.