Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
Fix weight (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkolegov authored Jul 14, 2023
1 parent dedc0ce commit 3cef757
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions e2e/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ type Validator struct {
}

type ValidatorData struct {
Addr addr.Address `json:"addr"`
NetAddr string `json:"net_addr"`
Weight *abi.TokenAmount `json:"weight"`
Addr addr.Address `json:"addr"`
NetAddr string `json:"net_addr"`
Weight string `json:"weight, string"`
}

type ValidatorSetData struct {
Expand All @@ -53,7 +53,7 @@ type ValidatorSetData struct {
}

func NewValidator(n int, ip string, ports ...string) (*Validator, error) {
w := abi.NewTokenAmount(1)
w := abi.NewTokenAmount(10)
v := Validator{
N: n,
APIPort: fmt.Sprintf("123%d", n),
Expand Down Expand Up @@ -94,7 +94,7 @@ func (v *Validator) Data() *ValidatorData {
return &ValidatorData{
Addr: v.Addr,
NetAddr: v.NetAddr,
Weight: v.Weight,
Weight: v.Weight.String(),
}
}

Expand Down
8 changes: 4 additions & 4 deletions scripts/mir/mir-config/configs/valset_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
{
"addr":"f1cp4q4lqsdhob23ysywffg2tvbmar5cshia4rweq",
"net_addr":"/ip4/127.0.0.1/udp/50958/quic/p2p/12D3KooWM4Z6tymWBUC9LQ7NNJ2RtzoakV1vDSyzehzC17Dpo367",
"weight": "0"
"weight": "1"
},
{
"addr":"f1akaouty2buxxwb46l27pzrhl3te2lw5jem67xuy",
"net_addr":"/ip4/127.0.0.1/udp/59718/quic/p2p/12D3KooWD9DHVsaPvBN5H16aWZ9KDChyrDSKVCnZegsJguuwd76E",
"weight": "0"
"weight": "1"
},
{
"addr":"f1vfp7yzvwy7ftktnex2cfoz2gpm2jyxlebqpam4q",
"net_addr":"/ip4/127.0.0.1/udp/36407/quic/p2p/12D3KooWPzySNmxchejUGB38VAgWjdnWLAeTph4UCXU61vcQcjBQ",
"weight": "0"
"weight": "1"
},
{
"addr":"f12zjpclnis2uytmcydrx7i5jcbvehs5ut3x6mvvq",
"net_addr":"/ip4/127.0.0.1/udp/53719/quic/p2p/12D3KooWGKf1QnctvXxn74bY4h8oPBZYBtZLaLYm8d82cQWTaniR",
"weight": "0"
"weight": "1"
}
]
}
10 changes: 5 additions & 5 deletions scripts/mir/mir-config/configs/valset_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
{
"addr":"f1cp4q4lqsdhob23ysywffg2tvbmar5cshia4rweq",
"net_addr":"/ip4/127.0.0.1/udp/50958/quic/p2p/12D3KooWM4Z6tymWBUC9LQ7NNJ2RtzoakV1vDSyzehzC17Dpo367",
"weight": "0"
"weight": "1"
},
{
"addr":"f1akaouty2buxxwb46l27pzrhl3te2lw5jem67xuy",
"net_addr":"/ip4/127.0.0.1/udp/59718/quic/p2p/12D3KooWD9DHVsaPvBN5H16aWZ9KDChyrDSKVCnZegsJguuwd76E",
"weight": "0"
"weight": "1"
},
{
"addr":"f1vfp7yzvwy7ftktnex2cfoz2gpm2jyxlebqpam4q",
"net_addr":"/ip4/127.0.0.1/udp/36407/quic/p2p/12D3KooWPzySNmxchejUGB38VAgWjdnWLAeTph4UCXU61vcQcjBQ",
"weight": "0"
"weight": "1"
},
{
"addr":"f12zjpclnis2uytmcydrx7i5jcbvehs5ut3x6mvvq",
"net_addr":"/ip4/127.0.0.1/udp/53719/quic/p2p/12D3KooWGKf1QnctvXxn74bY4h8oPBZYBtZLaLYm8d82cQWTaniR",
"weight": "0"
"weight": "1"
},
{
"addr":"f1by6b6zpawpvw34yzunaoxnumfvi4aokl7bmvncy",
"net_addr":"/ip4/127.0.0.1/udp/64225/quic/p2p/12D3KooWSCU1PKHpCgCj6jqugQQyVyHZz7noerok5Gs5gQZWFkJy",
"weight": "0"
"weight": "1"
}
]
}
8 changes: 4 additions & 4 deletions scripts/mir/mir-config/configs/valset_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
{
"addr":"f1cp4q4lqsdhob23ysywffg2tvbmar5cshia4rweq",
"net_addr":"/ip4/127.0.0.1/udp/50958/quic/p2p/12D3KooWM4Z6tymWBUC9LQ7NNJ2RtzoakV1vDSyzehzC17Dpo367",
"weight": "0"
"weight": "1"
},
{
"addr":"f1akaouty2buxxwb46l27pzrhl3te2lw5jem67xuy",
"net_addr":"/ip4/127.0.0.1/udp/59718/quic/p2p/12D3KooWD9DHVsaPvBN5H16aWZ9KDChyrDSKVCnZegsJguuwd76E",
"weight": "0"
"weight": "1"
},
{
"addr":"f1vfp7yzvwy7ftktnex2cfoz2gpm2jyxlebqpam4q",
"net_addr":"/ip4/127.0.0.1/udp/36407/quic/p2p/12D3KooWPzySNmxchejUGB38VAgWjdnWLAeTph4UCXU61vcQcjBQ",
"weight": "0"
"weight": "1"
},
{
"addr":"f12zjpclnis2uytmcydrx7i5jcbvehs5ut3x6mvvq",
"net_addr":"/ip4/127.0.0.1/udp/53719/quic/p2p/12D3KooWGKf1QnctvXxn74bY4h8oPBZYBtZLaLYm8d82cQWTaniR",
"weight": "0"
"weight": "1"
}
]
}

0 comments on commit 3cef757

Please sign in to comment.