Skip to content

Include consensus info in most GET requests #5

@lukechampine

Description

@lukechampine

For example, GET /balance would also return the current height and ID. This would allow the balance (and transactions, file contracts, etc.) to be checked "atomically" -- there is no uncertainty about which block height the reported information corresponds to. Currently, if you want that certainty, you must call /consensus, then /balance, then /consensus again, and check that the IDs match. If they don't, you must repeat the sequence until they do.

I'm wondering if there is a less intrusive way of including this information along with the response. Could it be placed in a header? It's not a big deal, but it irks me that calling /balance would return an object with a field called "balance" rather than simply returning the balance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions