mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-20 12:39:47 +01:00
Remove wallet::ParseISO8601DateTime, use ParseISO8601DateTime instead
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user