Skip to content

Commit

Permalink
Merge pull request #1901 from irisnet/release0.15
Browse files Browse the repository at this point in the history
Release version v0.15.1
  • Loading branch information
zhangyelong authored Aug 22, 2019
2 parents 37189a0 + ae5a43a commit 4aef9cb
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.15.1

*Aug 22th, 2019*

### Application
* [\#1895](https://github.com/irisnet/irishub/issues/1895) Run tendermint cleanupFunc before Exit
* [\#1897](https://github.com/irisnet/irishub/issues/1897) Fix possible panic on exporting genesis file

## 0.15.0

*Aug 20th, 2019*
Expand Down
3 changes: 0 additions & 3 deletions app/v1/distribution/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState) {
}
keeper.SetParams(ctx, data.Params)

if !data.FeePool.ValPool.IsZero() {
panic(fmt.Sprintf("Global validator pool(%s) is not zero", data.FeePool.ValPool.ToString()))
}
keeper.SetGenesisFeePool(ctx, data.FeePool)

for _, vdi := range data.ValidatorDistInfos {
Expand Down
9 changes: 6 additions & 3 deletions app/v1/distribution/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ func (k Keeper) GetFeePool(ctx sdk.Context) (feePool types.FeePool) {

// set the global fee pool distribution info
func (k Keeper) SetGenesisFeePool(ctx sdk.Context, feePool types.FeePool) {
//coins, _ := feePool.CommunityPool.TruncateDecimal()
//k.bankKeeper.IncreaseLoosenToken(ctx, coins)
//feePool.CommunityPool = types.NewDecCoins(coins)
if !feePool.ValPool.IsZero() {
coins, _ := feePool.ValPool.TruncateDecimal()
k.bankKeeper.IncreaseLoosenToken(ctx, coins)
feePool.ValPool = types.NewDecCoins(coins)
}

store := ctx.KVStore(k.storeKey)
b := k.cdc.MustMarshalBinaryLengthPrefixed(feePool)
store.Set(FeePoolKey, b)
Expand Down
6 changes: 0 additions & 6 deletions app/v1/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package v1

import (
"encoding/json"
"fmt"

"github.com/irisnet/irishub/app/protocol"
"github.com/irisnet/irishub/app/v1/asset"
Expand Down Expand Up @@ -121,11 +120,6 @@ func (p *ProtocolV1) prepForZeroHeightGenesis(ctx sdk.Context) {
if !feePool.TotalValAccum.Accum.IsZero() {
panic("unexpected leftover validator accum")
}
bondDenom := p.StakeKeeper.BondDenom()
if !feePool.ValPool.AmountOf(bondDenom).IsZero() {
panic(fmt.Sprintf("unexpected leftover validator pool coins: %v",
feePool.ValPool.AmountOf(bondDenom).String()))
}

// reset fee pool height, save fee pool
feePool.TotalValAccum = distr.NewTotalAccum(0)
Expand Down
2 changes: 1 addition & 1 deletion lite/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ info:
description: >-
A REST interface for state queries, transaction generation and
broadcast.
version: "0.15.0"
version: "0.15.1"
title: IRISLCD Swagger-UI
termsOfService: 'https://www.irisnet.org'
contact:
Expand Down
13 changes: 8 additions & 5 deletions server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,17 @@ func TrapSignal(cleanupFunc func()) {
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
go func() {
sig := <-sigs
if cleanupFunc != nil {
cleanupFunc()
}
exitCode := 128
switch sig {
case syscall.SIGTERM:
defer cleanupFunc()
os.Exit(128 + int(syscall.SIGTERM))
case syscall.SIGINT:
defer cleanupFunc()
os.Exit(128 + int(syscall.SIGINT))
exitCode += int(syscall.SIGINT)
case syscall.SIGTERM:
exitCode += int(syscall.SIGTERM)
}
os.Exit(exitCode)
}()
}

Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// Version - Iris Version
const ProtocolVersion = 1
const Version = "0.15.0"
const Version = "0.15.1"

// GitCommit set by build flags
var GitCommit = ""
Expand Down

0 comments on commit 4aef9cb

Please sign in to comment.