Skip to content

Commit

Permalink
Merge pull request #23 from spacemeshos/update-go-1.20
Browse files Browse the repository at this point in the history
Update to go 1.20
  • Loading branch information
fasmat committed Sep 7, 2023
2 parents fd846de + 6c2c6d8 commit bcb6698
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/spacemeshos/economics

go 1.19
go 1.20

require (
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05
Expand Down
3 changes: 2 additions & 1 deletion rewards/rewards.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package rewards

import (
"log"

"github.com/spacemeshos/economics/constants"

"github.com/ericlagergren/decimal"
"log"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions rewards/rewards_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package rewards

import (
"math"
"testing"

"github.com/ericlagergren/decimal"
"github.com/spacemeshos/economics/constants"
"github.com/stretchr/testify/assert"
"math"
"testing"
)

func Test_Lambda(t *testing.T) {
Expand Down
17 changes: 7 additions & 10 deletions sim.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ package main
import (
"flag"
"fmt"
"log"
"os"
"strconv"
"time"

"github.com/spacemeshos/economics/constants"
"github.com/spacemeshos/economics/rewards"
"github.com/spacemeshos/economics/vesting"
Expand All @@ -13,15 +18,9 @@ import (
"github.com/tcnksm/go-input"
"golang.org/x/text/language"
"golang.org/x/text/message"
"log"
"os"
"strconv"
"time"
)

var (
qFlag = flag.Bool("q", false, "quiet mode (noninteractive)")
)
var qFlag = flag.Bool("q", false, "quiet mode (noninteractive)")

func main() {
// parse flags
Expand Down Expand Up @@ -145,9 +144,7 @@ const (
defaultEndLayer = 10 * constants.OneYear
)

var (
defaultGenesisDate, _ = time.Parse("20060102", defaultGenesisDateStr)
)
var defaultGenesisDate, _ = time.Parse("20060102", defaultGenesisDateStr)

func getParams() (time.Time, uint32, uint32) {
// short-circuit UI in quiet mode
Expand Down
3 changes: 2 additions & 1 deletion vesting/vesting.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package vesting

import (
"github.com/spacemeshos/economics/constants"
"log"

"github.com/spacemeshos/economics/constants"
)

func AccumulatedVestAtLayer(layersAfterEffectiveGenesis uint32) uint64 {
Expand Down
3 changes: 2 additions & 1 deletion vesting/vesting_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package vesting

import (
"testing"

"github.com/spacemeshos/economics/constants"
"github.com/stretchr/testify/assert"
"testing"
)

func Test_Genesis(t *testing.T) {
Expand Down

0 comments on commit bcb6698

Please sign in to comment.