mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge pull request #1327 from psgreco/master-nopegin-ibd
getpeginaddress cannot be trusted during ibd, it should fail
This commit is contained in:
commit
5f1cc1ad8c
1 changed files with 4 additions and 0 deletions
|
|
@ -174,6 +174,10 @@ RPCHelpMan getpeginaddress()
|
|||
if (!wallet) return NullUniValue;
|
||||
CWallet* const pwallet = wallet.get();
|
||||
|
||||
if (pwallet->chain().isInitialBlockDownload()) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "This action cannot be completed during initial sync or reindexing.");
|
||||
}
|
||||
|
||||
LegacyScriptPubKeyMan* spk_man = pwallet->GetLegacyScriptPubKeyMan();
|
||||
if (!spk_man) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "This type of wallet does not support this command");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue