Skip to content

Commit

Permalink
IRISHUB-710: fix wrong example command and add log in replay
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoyangLiu committed Nov 14, 2018
1 parent aaa26a6 commit 8a57bcf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,13 @@ func (app *IrisApp) replay() int64 {
}
var loadHeight int64
if blockStore.Height() == curState.LastBlockHeight {
app.Logger.Info(fmt.Sprintf("blockstore height equals to current state height %d", curState.LastBlockHeight))
app.Logger.Info("Just reset state DB to last height")
sm.SaveState(stateDB, preState)
loadHeight = preState.LastBlockHeight
} else if blockStore.Height() == curState.LastBlockHeight+1 {
app.Logger.Info(fmt.Sprintf("blockstore height %d, current state height %d", blockStore.Height(), curState.LastBlockHeight))
app.Logger.Info(fmt.Sprintf("Retreat block %d in block store and reset state DB to last height", blockStore.Height()))
blockStore.RetreatLastBlock()
sm.SaveState(stateDB, preState)
loadHeight = preState.LastBlockHeight
Expand Down
4 changes: 2 additions & 2 deletions client/stake/cli/sendtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func GetCmdBeginRedelegate(storeName string, cdc *wire.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "begin",
Short: "begin redelegation",
Example: "iriscli stake redelegation begin --chain-id=<chain-id> --from=<key name> --fee=0.004iris --address-validator-source=<source validator address> --address-validator-dest=<destination validator address> shares-percent=0.5",
Example: "iriscli stake redelegation begin --chain-id=<chain-id> --from=<key name> --fee=0.004iris --address-validator-source=<source validator address> --address-validator-dest=<destination validator address> --shares-amount=1",
RunE: func(cmd *cobra.Command, args []string) error {
cliCtx := context.NewCLIContext().
WithCodec(cdc).
Expand Down Expand Up @@ -347,7 +347,7 @@ func GetCmdBeginUnbonding(storeName string, cdc *wire.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "begin",
Short: "begin unbonding",
Example: "iriscli stake unbond begin --chain-id=<chain-id> --from=<key name> --fee=0.004iris --address-validator=<validator address> shares-percent=0.5",
Example: "iriscli stake unbond begin --chain-id=<chain-id> --from=<key name> --fee=0.004iris --address-validator=<validator address> --shares-amount=1",
RunE: func(cmd *cobra.Command, args []string) error {
cliCtx := context.NewCLIContext().
WithCodec(cdc).
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// Version - Iris Version
const Version = "0.6.1"
const Version = "0.6.2"

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

0 comments on commit 8a57bcf

Please sign in to comment.