Skip to content

Commit ae7c118

Browse files
committed
x
1 parent 5a4830e commit ae7c118

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

action/protocol/staking/protocol.go

+3
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ func (p *Protocol) ReadState(ctx context.Context, sr protocol.StateReader, metho
468468
case iotexapi.ReadStakingDataMethod_TOTAL_STAKING_AMOUNT:
469469
if p.archiveMode && inputHeight < p.hu.GreenlandBlockHeight() {
470470
resp, height, err = p.candBucketsIndexer.GetStakingBalance(inputHeight)
471+
if err != nil {
472+
resp, height, err = readStateTotalStakingAmount(ctx, csr, r.GetTotalStakingAmount())
473+
}
471474
} else {
472475
resp, height, err = readStateTotalStakingAmount(ctx, csr, r.GetTotalStakingAmount())
473476
}

0 commit comments

Comments
 (0)