Skip to content

Commit 3802a73

Browse files
committed
[PSL-1266] pasteld: starting block parameter for rescan mode in importprivkey/importaddress APIs
added optional parameter - starting block height or hash to start rescan from for improtprivkey, importaddress APIs 1) importprivkey "zcashprivkey" ( "label" rescan rescan_start ) Adds a private key (as returned by dumpprivkey) to your wallet. Arguments: 1. "zcashprivkey" (string, required) The private key (see dumpprivkey) 2. "label" (string, optional, default="") An optional label 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions 4. rescan_start (numeric or string, optional, default=0) Block height or hash to start rescan from 2) importaddress "address" ( "label" rescan rescan_start ) Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Arguments: 1. "address" (string, required) The address 2. "label" (string, optional, default="") An optional label 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions 4. rescan_start (numeric or string, optional, default=0) Block height or hash to start rescan from
1 parent a1f678e commit 3802a73

File tree

16 files changed

+88
-44
lines changed

16 files changed

+88
-44
lines changed

build-aux/vs2022/libbitcoin_common/libbitcoin_common.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
<ClInclude Include="..\..\..\src\chain_options.h" />
123123
<ClInclude Include="..\..\..\src\coins.h" />
124124
<ClInclude Include="..\..\..\src\compressor.h" />
125+
<ClInclude Include="..\..\..\src\config\port_config.h" />
125126
<ClInclude Include="..\..\..\src\consensus\consensus.h" />
126127
<ClInclude Include="..\..\..\src\consensus\params.h" />
127128
<ClInclude Include="..\..\..\src\consensus\upgrades.h" />
@@ -132,7 +133,6 @@
132133
<ClInclude Include="..\..\..\src\key_constants.h" />
133134
<ClInclude Include="..\..\..\src\key_io.h" />
134135
<ClInclude Include="..\..\..\src\netbase.h" />
135-
<ClInclude Include="..\..\..\src\port_config.h" />
136136
<ClInclude Include="..\..\..\src\primitives\block.h" />
137137
<ClInclude Include="..\..\..\src\primitives\transaction.h" />
138138
<ClInclude Include="..\..\..\src\protocol.h" />

build-aux/vs2022/libbitcoin_common/libbitcoin_common.vcxproj.filters

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<Filter Include="Source Files\script">
1515
<UniqueIdentifier>{25589cb1-47ee-4baa-8c2f-13098b8c1c58}</UniqueIdentifier>
1616
</Filter>
17+
<Filter Include="Source Files\config">
18+
<UniqueIdentifier>{8475fc84-56ca-4579-ada8-0b0f371d2714}</UniqueIdentifier>
19+
</Filter>
1720
</ItemGroup>
1821
<ItemGroup>
1922
<ClCompile Include="..\..\..\src\amount.cpp">
@@ -168,9 +171,6 @@
168171
<ClInclude Include="..\..\..\src\utiltest.h">
169172
<Filter>Source Files</Filter>
170173
</ClInclude>
171-
<ClInclude Include="..\..\..\src\port_config.h">
172-
<Filter>Source Files</Filter>
173-
</ClInclude>
174174
<ClInclude Include="..\..\..\src\script\scripttype.h">
175175
<Filter>Source Files\script</Filter>
176176
</ClInclude>
@@ -180,5 +180,8 @@
180180
<ClInclude Include="..\..\..\src\chain_options.h">
181181
<Filter>Source Files</Filter>
182182
</ClInclude>
183+
<ClInclude Include="..\..\..\src\config\port_config.h">
184+
<Filter>Source Files\config</Filter>
185+
</ClInclude>
183186
</ItemGroup>
184187
</Project>

build-aux/vs2022/settings/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<BIN_DIR>$(PSL_ROOT)bin\</BIN_DIR>
77
<VS>vs2022</VS>
88
<VSCOMMON>vs</VSCOMMON>
9-
<VC>17</VC>
9+
<VC>20</VC>
1010
<RELEASE_OUTDIR>$(BIN_DIR)$(VS)\$(Configuration)_$(PlatformName)\</RELEASE_OUTDIR>
1111
<DEPENDS>$(PSL_ROOT)depends\x86_64-pc-windows-msvc\</DEPENDS>
1212
<LIBDBGSFX Condition="'$(Configuration)'=='Debug'">d</LIBDBGSFX>

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
22
AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 2)
44
define(_CLIENT_VERSION_MINOR, 2)
5-
define(_CLIENT_VERSION_REVISION, 7)
5+
define(_CLIENT_VERSION_REVISION, 8)
66
define(_CLIENT_VERSION_BUILD, 50)
77
define(_ZC_BUILD_VAL,
88
m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD),

src/clientversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
//! These need to be macros, as clientversion.cpp's and pastel*-res.rc's voodoo requires it
1717
#define CLIENT_VERSION_MAJOR 2
1818
#define CLIENT_VERSION_MINOR 2
19-
#define CLIENT_VERSION_REVISION 7
20-
#define CLIENT_VERSION_BUILD 5
19+
#define CLIENT_VERSION_REVISION 8
20+
#define CLIENT_VERSION_BUILD 50
2121

2222
//! Set to true for release, false for prerelease or test build
2323
#define CLIENT_VERSION_IS_RELEASE true

src/config/pastel-config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define CLIENT_VERSION_MINOR 2
2222

2323
/* Build revision */
24-
#define CLIENT_VERSION_REVISION 7
24+
#define CLIENT_VERSION_REVISION 8
2525

2626
/* Version is release */
2727
#define COPYRIGHT_YEAR 2024
@@ -305,7 +305,7 @@
305305
#define PACKAGE_NAME "Pastel"
306306

307307
/* Define to the full name and version of this package. */
308-
#define PACKAGE_STRING "Pastel 2.2.7"
308+
#define PACKAGE_STRING "Pastel 2.2.8"
309309

310310
/* Define to the one symbol short name of this package. */
311311
#define PACKAGE_TARNAME "pastel"
@@ -314,7 +314,7 @@
314314
#define PACKAGE_URL ""
315315

316316
/* Define to the version of this package. */
317-
#define PACKAGE_VERSION "2.2.7"
317+
#define PACKAGE_VERSION "2.2.8"
318318

319319
/* Define to necessary symbol if this constant uses a non-standard name on
320320
your system. */

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ string HelpMessage(HelpMessageMode mode)
594594
strUsage += HelpMessageOpt("-rpcbind=<addr>", translate("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)"));
595595
strUsage += HelpMessageOpt("-rpcuser=<user>", translate("Username for JSON-RPC connections"));
596596
strUsage += HelpMessageOpt("-rpcpassword=<pw>", translate("Password for JSON-RPC connections"));
597-
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(translate("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), 9932, 19932));
597+
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(translate("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u or devnet: %u)"), MAINNET_DEFAULT_RPC_PORT, TESTNET_DEFAULT_RPC_PORT, DEVNET_DEFAULT_RPC_PORT));
598598
strUsage += HelpMessageOpt("-rpcallowip=<ip>", translate("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"));
599599
strUsage += HelpMessageOpt("-rpcthreads=<n>", strprintf(translate("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS));
600600
if (showDebug) {

src/metrics.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <ui_interface.h>
2626
#include <utilmoneystr.h>
2727
#include <netmsg/nodemanager.h>
28+
#include <mining/miner.h>
2829

2930
using namespace std;
3031

@@ -268,13 +269,15 @@ int printMiningStatus(bool mining)
268269
GetArg("-equihashsolver", "default"), nThreads) << endl;
269270
else
270271
{
271-
bool fvNodesEmpty = gl_NodeManager.GetNodeCount() == 0;
272+
const bool fvNodesEmpty = gl_NodeManager.GetNodeCount() == 0;
272273
if (fvNodesEmpty)
273274
cout << translate("Mining is paused while waiting for connections.") << endl;
274275
else if (fnIsInitialBlockDownload(consensusParams))
275276
cout << translate("Mining is paused while downloading blocks.") << endl;
277+
else if (!gl_bEligibleForMiningNextBlock)
278+
cout << translate("Mining is paused (not eligible to mine next block).") << endl;
276279
else
277-
cout << translate("Mining is paused (a JoinSplit may be in progress).") << endl;
280+
cout << translate("Mining is paused.") << endl;
278281
}
279282
lines++;
280283
} else {

src/mnode/rpc/ingest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ R"("ingest" ingest|ani2psl|ani2psl_secret ...
202202
string sKeyError;
203203
const CKey pslKey = ani2psl_secret(aniSecret, sKeyError);
204204
if (!pslKey.IsValid())
205-
throw JSONRPCError(RPC_INVALID_PARAMETER, tinyformat::format("Invalid private key, %s", sKeyError.c_str()));
205+
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid private key, %s", sKeyError.c_str()));
206206
return keyIO.EncodeSecret(pslKey);
207207
}
208208
return NullUniValue;

src/rpc/chain-rpc-utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ using namespace std;
2121
* \param paramValue - rpc parameter value (block hash or block height)
2222
* \return block hash or block height
2323
*/
24-
variant<uint32_t, uint256> rpc_get_block_hash_or_height(const UniValue& paramValue)
24+
block_id_t rpc_get_block_hash_or_height(const UniValue& paramValue)
2525
{
2626
if (paramValue.isNull())
2727
throw JSONRPCError(RPC_INVALID_PARAMETER, "Block hash or height parameter is required");

0 commit comments

Comments
 (0)