Skip to content

Is it necessary to restrict the resource input value to 0 or 1? #939

Description

@abn2357

In the old REPL mode: the four freeze/unfreeze balance interfaces (1.0 and 2.0) accept not only 0 (bandwidth) and 1 (energy), but also 2 (tron power). The README in the official wallet-cli repository also mentions this in some places like: "> freezeBalanceV2 [OwnerAddress] frozen_balance [ResourceCode:0 BANDWIDTH,1 ENERGY,2 TRON_POWER]". Since the mainnet has not enabled getAllowNewResourceModel, passing in 2 does not cause an error on the client side, but the node will throw a validation error.

In the recently new written standard CLI mode: the client directly restricts resource input to only 0 and 1.

Also, other staking-related API documentation based on java-tron all restrict resource input to 0 or 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions