5 func TestSubsidy(t *testing.T) {
16 height: subsidyReductionInterval - 1,
19 subsidy: baseSubsidy / 2,
20 height: subsidyReductionInterval,
23 subsidy: baseSubsidy / 2,
24 height: subsidyReductionInterval + 1,
27 subsidy: baseSubsidy / 1024,
28 height: subsidyReductionInterval * 10,
32 for _, c := range cases {
33 subsidy := BlockSubsidy(c.height)
34 if subsidy != c.subsidy {
35 t.Errorf("got subsidy %d, want %d", subsidy, c.subsidy)