Skip to content

Commit 53434e0

Browse files
authored
[ioctl] show bucket's auto-stake status (iotexproject#2178)
1 parent f942651 commit 53434e0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ioctl/cmd/bc/bucket.go

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ type bucket struct {
5959
candidate string
6060
stakedAmount string
6161
stakedDuration uint32
62+
autoStake bool
6263
createTime string
6364
stakeStartTime string
6465
unstakeStartTime string
@@ -83,6 +84,7 @@ func newBucket(bucketpb *iotextypes.VoteBucket) (*bucket, error) {
8384
candidate: bucketpb.CandidateAddress,
8485
stakedAmount: util.RauToString(amount, util.IotxDecimalNum),
8586
stakedDuration: bucketpb.StakedDuration,
87+
autoStake: bucketpb.AutoStake,
8688
createTime: ptypes.TimestampString(bucketpb.CreateTime),
8789
stakeStartTime: ptypes.TimestampString(bucketpb.StakeStartTime),
8890
unstakeStartTime: unstakeStartTimeFormat,
@@ -97,6 +99,7 @@ func (b *bucket) String() string {
9799
lines = append(lines, fmt.Sprintf("candidate: %s", b.candidate))
98100
lines = append(lines, fmt.Sprintf("stakedAmount: %s IOTX", b.stakedAmount))
99101
lines = append(lines, fmt.Sprintf("stakedDuration: %d days", b.stakedDuration))
102+
lines = append(lines, fmt.Sprintf("autoStake: %v", b.autoStake))
100103
lines = append(lines, fmt.Sprintf("createTime: %s", b.createTime))
101104
lines = append(lines, fmt.Sprintf("stakeStartTime: %s", b.stakeStartTime))
102105
lines = append(lines, fmt.Sprintf("unstakeStartTime: %s", b.unstakeStartTime))

ioctl/config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
"github.com/spf13/cobra"
1515
"gopkg.in/yaml.v2"
16-
16+
1717
"github.com/iotexproject/iotex-core/config"
1818
"github.com/iotexproject/iotex-core/ioctl/output"
1919
"github.com/iotexproject/iotex-core/pkg/log"

0 commit comments

Comments
 (0)