Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R4R F1 mechanism rounding fix #3788

Merged
Prev Previous commit
Next Next commit
lint
  • Loading branch information
rigelrozanski committed Mar 2, 2019
commit 11869df385a95d798f67aaf8d453dc82df038944
4 changes: 2 additions & 2 deletions types/dec_coin.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ func (coins DecCoins) IsAllPositive() bool {
return true
}

// MinSet will return a new set of coins which containts the minimum decCoin
// for common denoms found in both `coins` and `coinsB`. for denoms not common
// MinSet will return a new set of coins which contains the minimum decCoin
// for common denoms found in both `coins` and `coinsB`. For denoms not common
// to both `coins` and `coinsB` the minimum is considered to be 0, thus they are
// not added to the final set.
func MinSet(coinsA, coinsB DecCoins) DecCoins {
rigelrozanski marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
14 changes: 7 additions & 7 deletions x/mock/simulation/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ func logPrinter(testingmode bool, logs []*strings.Builder) func() {
}

var f *os.File
//if numLoggers > 10 {
fileName := fmt.Sprintf("simulation_log_%s.txt",
time.Now().Format("2006-01-02 15:04:05"))
fmt.Printf("Too many logs to display, instead writing to %s\n",
fileName)
f, _ = os.Create(fileName)
//}
if numLoggers > 10 {
fileName := fmt.Sprintf("simulation_log_%s.txt",
time.Now().Format("2006-01-02 15:04:05"))
fmt.Printf("Too many logs to display, instead writing to %s\n",
fileName)
f, _ = os.Create(fileName)
}

for i := 0; i < numLoggers; i++ {
if f == nil {
Expand Down