ethapi: fix ineffassign warning (#1907)

This commit is contained in:
wit liu 2026-01-04 19:51:09 +08:00 committed by GitHub
parent 2a56eccf45
commit 51e3c866c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2661,7 +2661,7 @@ func (s *BlockChainAPI) GetTokenStats(ctx context.Context, epochNr rpc.EpochNumb
if !ok {
return nil, errors.New("undefined XDPoS consensus engine")
}
statedb, header, err := s.b.StateAndHeaderByNumber(ctx, rpc.LatestBlockNumber)
statedb, header, _ := s.b.StateAndHeaderByNumber(ctx, rpc.LatestBlockNumber)
nonce := statedb.GetNonce(common.MintedRecordAddressBinary)
if nonce == 0 {
return nil, errors.New("mintedRecordAddress is not initialized due to Reward Upgrade is not applied")