From e0281741b6cc1f0245a8a9a3477d61da315e0cee Mon Sep 17 00:00:00 2001 From: alex v Date: Sat, 24 Aug 2024 11:00:10 +0200 Subject: [PATCH] restore tokenid changes --- src/ctokens/tokenid.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/ctokens/tokenid.h b/src/ctokens/tokenid.h index 8b2f0b588c473..86efa6c5d547e 100644 --- a/src/ctokens/tokenid.h +++ b/src/ctokens/tokenid.h @@ -10,9 +10,6 @@ #include #include -const uint256 stakedCommitmentToken = uint256(); -const uint64_t stakedCommitmentSubId = 1; - class TokenId { public: @@ -21,11 +18,6 @@ class TokenId TokenId(const uint256& t = uint256(), const uint64_t& i = std::numeric_limits::max()) : token(t), subid(i) {} - static TokenId StakedCommitment() - { - return TokenId(stakedCommitmentToken, stakedCommitmentSubId); - } - void SetNull() { token = uint256(); @@ -34,12 +26,7 @@ class TokenId bool IsNull() const { return token == uint256() && subid == std::numeric_limits::max(); } - bool IsStakedCommitment() const - { - return token == stakedCommitmentToken && subid == stakedCommitmentSubId; - } - - std::string ToString() const { return strprintf("%s%s", token.ToString(), strprintf("#%d", subid)); } + std::string ToString() const { return strprintf("%s%s", token.ToString(), subid == std::numeric_limits::max() ? "" : strprintf("#%d", subid)); } friend bool operator==(const TokenId& a, const TokenId& b) { return a.token == b.token && a.subid == b.subid; }