@@ -321,7 +321,8 @@ func (core *coreService) Account(addr address.Address) (*iotextypes.AccountMeta,
321321 ctx , span := tracer .NewSpan (context .Background (), "coreService.Account" )
322322 defer span .End ()
323323 addrStr := addr .String ()
324- if addrStr == address .RewardingPoolAddr || addrStr == address .StakingBucketPoolAddr {
324+ if addrStr == address .RewardingPoolAddr || addrStr == address .StakingBucketPoolAddr ||
325+ addrStr == address .RewardingProtocol || addrStr == address .StakingProtocolAddr {
325326 return core .getProtocolAccount (ctx , addrStr )
326327 }
327328 span .AddEvent ("accountutil.AccountStateWithHeight" )
@@ -1760,7 +1761,7 @@ func (core *coreService) getProtocolAccount(ctx context.Context, addr string) (*
17601761 err error
17611762 )
17621763 switch addr {
1763- case address .RewardingPoolAddr :
1764+ case address .RewardingPoolAddr , address . RewardingProtocol :
17641765 if out , err = core .ReadState ("rewarding" , "" , []byte ("TotalBalance" ), nil ); err != nil {
17651766 return nil , nil , err
17661767 }
@@ -1769,7 +1770,7 @@ func (core *coreService) getProtocolAccount(ctx context.Context, addr string) (*
17691770 return nil , nil , errors .New ("balance convert error" )
17701771 }
17711772 balance = val .String ()
1772- case address .StakingBucketPoolAddr :
1773+ case address .StakingBucketPoolAddr , address . StakingProtocolAddr :
17731774 methodName , err := proto .Marshal (& iotexapi.ReadStakingDataMethod {
17741775 Method : iotexapi .ReadStakingDataMethod_TOTAL_STAKING_AMOUNT ,
17751776 })
0 commit comments