Remove wallet::ParseISO8601DateTime, use ParseISO8601DateTime instead

This commit is contained in:
MarcoFalke
2024-11-28 13:41:54 +01:00
parent 2222aecd5f
commit faf70cc994
10 changed files with 11 additions and 79 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009-2022 The Bitcoin Core developers
// Copyright (c) 2009-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -549,7 +549,7 @@ RPCHelpMan importwallet()
continue;
CKey key = DecodeSecret(vstr[0]);
if (key.IsValid()) {
int64_t nTime = ParseISO8601DateTime(vstr[1]);
int64_t nTime{ParseISO8601DateTime(vstr[1]).value_or(0)};
std::string strLabel;
bool fLabel = true;
for (unsigned int nStr = 2; nStr < vstr.size(); nStr++) {
@@ -569,7 +569,7 @@ RPCHelpMan importwallet()
} else if(IsHex(vstr[0])) {
std::vector<unsigned char> vData(ParseHex(vstr[0]));
CScript script = CScript(vData.begin(), vData.end());
int64_t birth_time = ParseISO8601DateTime(vstr[1]);
int64_t birth_time{ParseISO8601DateTime(vstr[1]).value_or(0)};
if (birth_time > 0) nTimeBegin = std::min(nTimeBegin, birth_time);
scripts.emplace_back(script, birth_time);
}