mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 15:28:49 +02:00
refactor: Remove SetHexDeprecated
After replacing all instances of `SetHexDeprecated` in the GUI, remove it entirely and reimplement the behavior in `FromHex`.
This commit is contained in:
@@ -147,7 +147,7 @@ BOOST_AUTO_TEST_CASE( comparison ) // <= >= < >
|
||||
uint256{"0000000000000000000000000000000000000000000000000000000000000001"});
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(methods) // GetHex SetHexDeprecated FromHex begin() end() size() GetLow64 GetSerializeSize, Serialize, Unserialize
|
||||
BOOST_AUTO_TEST_CASE(methods) // GetHex FromHex begin() end() size() GetLow64 GetSerializeSize, Serialize, Unserialize
|
||||
{
|
||||
BOOST_CHECK_EQUAL(R1L.GetHex(), R1L.ToString());
|
||||
BOOST_CHECK_EQUAL(R2L.GetHex(), R2L.ToString());
|
||||
@@ -155,9 +155,6 @@ BOOST_AUTO_TEST_CASE(methods) // GetHex SetHexDeprecated FromHex begin() end() s
|
||||
BOOST_CHECK_EQUAL(MaxL.GetHex(), MaxL.ToString());
|
||||
uint256 TmpL(R1L);
|
||||
BOOST_CHECK_EQUAL(TmpL, R1L);
|
||||
// Verify previous values don't persist when setting to truncated string.
|
||||
TmpL.SetHexDeprecated("21");
|
||||
BOOST_CHECK_EQUAL(TmpL.ToString(), "0000000000000000000000000000000000000000000000000000000000000021");
|
||||
BOOST_CHECK_EQUAL(uint256::FromHex(R2L.ToString()).value(), R2L);
|
||||
BOOST_CHECK_EQUAL(uint256::FromHex(ZeroL.ToString()).value(), uint256());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user