kaiachain / kaia

GNU Lesser General Public License v3.0
21 stars 26 forks source link

api: getTotalSupply can fall back to Upstream EN #58

Closed blukat29 closed 3 months ago

blukat29 commented 3 months ago

Proposed changes

  1. In the kaia_getTotalSupply API, add an optional showPartial *bool parameter that controls the error behavior.
  1. More generous --upstream-en criteria

Rationale

Regular users of this API are interested in the full information including the totalSupply field. For those uses, responses (b) and (c) are both unsatisfactory. But compared to (b), (c) is better because it can at least retry via --upstream-en.

Response example

Types of changes

Please put an x in the boxes related to your change.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Related issues

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...