Skip to content

Commit

Permalink
bump version to v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricfung committed Jan 25, 2024
1 parent 5464b4e commit 5991a18
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion mtg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ type Configuration struct {
Threshold int `toml:"threshold"`
Timestamp int64 `toml:"timestamp"`
} `toml:"genesis"`
GroupSize int `toml:"group-size"`
GroupSize int `toml:"group-size"`
LoopWaitDuration int64 `toml:"loop-wait-duration"`
}

func Setup(path string) (*Configuration, error) {
Expand Down
26 changes: 14 additions & 12 deletions mtg/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ const (
)

type Group struct {
mixin *mixin.Client
store Store
workers []Worker
grouper func(*Output) string
groupSize int
mixin *mixin.Client
store Store
workers []Worker
grouper func(*Output) string
groupSize int
waitDuration time.Duration

clock *Clock
id string
Expand Down Expand Up @@ -59,11 +60,12 @@ func BuildGroup(ctx context.Context, store Store, conf *Configuration) (*Group,
}

grp := &Group{
mixin: client,
store: store,
pin: conf.App.PIN,
id: generateGenesisId(conf),
groupSize: conf.GroupSize,
mixin: client,
store: store,
pin: conf.App.PIN,
id: generateGenesisId(conf),
groupSize: conf.GroupSize,
waitDuration: time.Duration(conf.LoopWaitDuration),
}
if grp.groupSize <= 0 {
grp.groupSize = OutputsBatchSize
Expand Down Expand Up @@ -135,10 +137,10 @@ func (grp *Group) AddWorker(wkr Worker) {
}

func (grp *Group) Run(ctx context.Context) {
logger.Printf("Group(%s, %d, %s).Run(v0.6.0)\n", mixin.HashMembers(grp.members), grp.threshold, grp.GenesisId())
logger.Printf("Group(%s, %d, %s).Run(v0.6.1)\n", mixin.HashMembers(grp.members), grp.threshold, grp.GenesisId())
filter := make(map[string]bool)
for {
time.Sleep(time.Second)
time.Sleep(grp.waitDuration)
// drain all the utxos in the order of created time
logger.Verbosef("Group.Run(drainOutputsFromNetwork) created\n")
grp.drainOutputsFromNetwork(ctx, filter, 500, "created")
Expand Down
2 changes: 1 addition & 1 deletion mvm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/urfave/cli/v2"
)

const AppVersion = "0.6.0"
const AppVersion = "0.6.1"

func main() {
app := &cli.App{
Expand Down

0 comments on commit 5991a18

Please sign in to comment.