Skip to content

Commit ed80bd7

Browse files
committed
x
1 parent e8c144b commit ed80bd7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

action/protocol/staking/candidate_buckets_indexer.go

+3
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ func (cbi *CandidatesBucketsIndexer) GetStakingBalance(height uint64) (*iotextyp
187187
hei := byteutil.Uint64ToBytesBigEndian(height)
188188
historyKey := append(bucketPoolAddrKey, hei...)
189189
balanceBytes, err := cbi.kvStore.Get(StakingBucketsNamespace, historyKey)
190+
if err != nil {
191+
return nil, 0, err
192+
}
190193
meta := iotextypes.AccountMeta{}
191194
meta.Address = address.StakingBucketPoolAddr
192195
if err != nil {

action/protocol/staking/protocol.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ func (p *Protocol) ReadState(ctx context.Context, sr protocol.StateReader, metho
467467
resp, height, err = readStateCandidateByAddress(ctx, csr, r.GetCandidateByAddress())
468468
case iotexapi.ReadStakingDataMethod_TOTAL_STAKING_AMOUNT:
469469
//if p.archiveMode && inputHeight < p.hu.GreenlandBlockHeight() && inputHeight >= p.hu.FairbankBlockHeight() {
470-
if p.archiveMode && inputHeight < p.hu.GreenlandBlockHeight() && inputHeight >= 5160927 {
470+
if p.archiveMode && inputHeight < p.hu.GreenlandBlockHeight() && inputHeight >= 5160000 {
471471
resp, height, err = p.candBucketsIndexer.GetStakingBalance(inputHeight)
472472
//if err != nil {
473473
// resp, height, err = readStateTotalStakingAmount(ctx, csr, r.GetTotalStakingAmount())

0 commit comments

Comments
 (0)