Skip to content

Commit fc5d7a3

Browse files
committed
x
1 parent f1c3978 commit fc5d7a3

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

action/protocol/staking/protocol.go

-4
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ const (
3737
// StakingNameSpace is the bucket name for staking state
3838
StakingNameSpace = "Staking"
3939

40-
// StakingNameSpaceForStakingAddress is the bucket name for staking state
41-
StakingNameSpaceForStakingAddress = "StakingForStakingAddress"
42-
4340
// CandidateNameSpace is the bucket name for candidate state
4441
CandidateNameSpace = "Candidate"
4542
)
@@ -436,7 +433,6 @@ func (p *Protocol) ReadState(ctx context.Context, sr protocol.StateReader, metho
436433
if err != nil {
437434
return nil, 0, err
438435
}
439-
440436
rp := rolldpos.MustGetProtocol(protocol.MustGetRegistry(ctx))
441437
epochStartHeight := rp.GetEpochHeight(rp.GetEpochNum(inputHeight))
442438

api/api.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -1667,11 +1667,11 @@ func (api *Server) getProtocolAccount(ctx context.Context, height uint64, addr s
16671667
}
16681668
out, err = api.ReadState2(ctx, req)
16691669
if err != nil {
1670-
//balance = "0"
1671-
out, err = api.ReadState(ctx, &iotexapi.ReadStateRequest{
1672-
ProtocolID: []byte("rewarding"),
1673-
MethodName: []byte("TotalBalance"),
1674-
})
1670+
balance = "0"
1671+
//out, err = api.ReadState(ctx, &iotexapi.ReadStateRequest{
1672+
// ProtocolID: []byte("rewarding"),
1673+
// MethodName: []byte("TotalBalance"),
1674+
//})
16751675
} else {
16761676
val, ok := big.NewInt(0).SetString(string(out.GetData()), 10)
16771677
if !ok {

0 commit comments

Comments
 (0)