mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
test: [refactor] Use ToIntegral in CheckInferDescriptor
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
#include <script/descriptor.h>
|
#include <script/descriptor.h>
|
||||||
#include <script/sign.h>
|
#include <script/sign.h>
|
||||||
#include <test/util/setup_common.h>
|
#include <test/util/setup_common.h>
|
||||||
|
#include <util/check.h>
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
#include <util/string.h>
|
#include <util/string.h>
|
||||||
|
|
||||||
@@ -496,8 +497,7 @@ void CheckInferDescriptor(const std::string& script_hex, const std::string& expe
|
|||||||
hardened = true;
|
hardened = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint32_t p;
|
const uint32_t p{*Assert(ToIntegral<uint32_t>(std::string_view{elem.begin(), elem.end()}))};
|
||||||
assert(ParseUInt32(std::string(elem.begin(), elem.end()), &p));
|
|
||||||
info.path.push_back(p | (((uint32_t)hardened) << 31));
|
info.path.push_back(p | (((uint32_t)hardened) << 31));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user