The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/staking/network/reward_test.go

25 lines
709 B

package network
import (
"testing"
"github.com/harmony-one/harmony/numeric"
)
func TestFiveSecondsBaseStakedReward(t *testing.T) {
expectedNewReward := BaseStakedReward.Mul(numeric.MustNewDecFromStr("5")).Quo(numeric.MustNewDecFromStr("8"))
if !expectedNewReward.Equal(FiveSecondsBaseStakedReward) {
t.Errorf(
"Expected: %s, Got: %s", FiveSecondsBaseStakedReward.String(), expectedNewReward.String(),
)
}
expectedNewReward = BaseStakedReward.Mul(numeric.MustNewDecFromStr("3")).Quo(numeric.MustNewDecFromStr("8"))
if !expectedNewReward.Equal(ThreeSecondsBaseStakedReward) {
t.Errorf(
"Expected: %s, Got: %s", ThreeSecondsBaseStakedReward.String(), expectedNewReward.String(),
)
}
}