HARDFORK_SON3_TIME to 2022-04-01T00:00:00, limit wallet rescan from 2022-01-01

This commit is contained in:
serkixenos 2022-03-23 09:03:44 -04:00
parent ddd0d2fd16
commit 65ba17adb0
2 changed files with 9 additions and 7 deletions

View file

@ -1,7 +1,7 @@
#ifndef HARDFORK_SON3_TIME
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_SON3_TIME (fc::time_point_sec::from_iso_string("2022-05-31T00:00:00"))
#define HARDFORK_SON3_TIME (fc::time_point_sec::from_iso_string("2022-04-01T00:00:00"))
#else
#define HARDFORK_SON3_TIME (fc::time_point_sec::from_iso_string("2022-05-31T00:00:00"))
#define HARDFORK_SON3_TIME (fc::time_point_sec::from_iso_string("2022-04-01T00:00:00"))
#endif
#endif

View file

@ -579,13 +579,14 @@ void bitcoin_rpc_client::importmulti(const std::vector<multi_params> &address_or
std::string argument_1 = "[";
for (const auto &param : address_or_script_array) {
argument_1 += "{\"scriptPubKey\": ";
if (param.type == multi_type::address)
if (param.type == multi_type::address) {
argument_1 += "{\"address\": \"" + param.address_or_script + "\"}";
else if (param.type == multi_type::script)
} else if (param.type == multi_type::script) {
argument_1 += "\"" + param.address_or_script + "\"";
else
} else {
FC_THROW("Invalid multi_type.");
argument_1 += ", \"label\": \"" + param.label + "\", \"timestamp\": " + std::to_string(HARDFORK_SON_TIME.sec_since_epoch()) + "}";
}
argument_1 += ", \"label\": \"" + param.label + "\", \"timestamp\": " + std::to_string(fc::time_point_sec::from_iso_string("2022-01-01T00:00:00").sec_since_epoch()) + "}";
//! Note
/* Creation time of the key expressed in UNIX epoch time,
@ -595,8 +596,9 @@ void bitcoin_rpc_client::importmulti(const std::vector<multi_params> &address_or
0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key
creation time of all keys being imported by the importmulti call will be scanned.*/
if (&param != &address_or_script_array.back())
if (&param != &address_or_script_array.back()) {
argument_1 += ", ";
}
}
argument_1 += "]";