From fe6f6e7e612dc80fd4b357a23734f7dec94eee6d Mon Sep 17 00:00:00 2001 From: Kevin Loubser Date: Wed, 3 Apr 2024 10:17:31 +0200 Subject: [PATCH] Minimal changes needed to detect cold staking cold addresses --- AddressOwnershipTool/Commands/Claim/ClaimInstruction.cs | 4 ++++ AddressOwnershipTool/Common/AddressOwnershipService.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AddressOwnershipTool/Commands/Claim/ClaimInstruction.cs b/AddressOwnershipTool/Commands/Claim/ClaimInstruction.cs index a6a03bd..0422b89 100644 --- a/AddressOwnershipTool/Commands/Claim/ClaimInstruction.cs +++ b/AddressOwnershipTool/Commands/Claim/ClaimInstruction.cs @@ -29,6 +29,9 @@ public class ClaimInstruction : BaseInstruction [Option('p', "privkeyfile", Required = false, HelpText = "Please provide private key file, if used all other settings not required.")] public string PrivateKeyFile { get; set; } + [Option('z', "deep", Required = false, HelpText = "Perform deep scan. Generally only needed if cold staking addresses need to be included")] + public bool Deep { get; set; } + public ClaimCommand ToCommand() { return new ClaimCommand @@ -38,6 +41,7 @@ public ClaimCommand ToCommand() WalletName = WalletName, Testnet = Testnet, PrivateKeyFile = PrivateKeyFile, + Deep = Deep, UseCirrus = UseCirrus, Destination = Destination, DataFolder = DataFolder, diff --git a/AddressOwnershipTool/Common/AddressOwnershipService.cs b/AddressOwnershipTool/Common/AddressOwnershipService.cs index 9835219..f8555a7 100644 --- a/AddressOwnershipTool/Common/AddressOwnershipService.cs +++ b/AddressOwnershipTool/Common/AddressOwnershipService.cs @@ -300,7 +300,7 @@ public void SbfnExport(string walletName, string walletPassword, string destinat public void HdAddressExport(Wallet wallet, string walletPassword, string destinationAddress, bool deepExport = false) { - foreach (HdAddress address in wallet.GetAllAddresses()) + foreach (HdAddress address in wallet.GetAllAddresses(Wallet.AllAccounts)) { if (address.Transactions.Count == 0 && !deepExport) continue;