mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-01-24 17:31:10 +00:00
deduplicate output descriptors for bwt
This commit is contained in:
parent
31fb527218
commit
3b3e46983f
2 changed files with 4 additions and 4 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit 49654b7c82d104f7898eff95f0ac3cec96fbc0ec
|
||||
Subproject commit 428054d375b638bb7e08133fdffe6f1dd438cca9
|
|
@ -58,7 +58,7 @@ public class Bwt {
|
|||
private void start(Collection<Wallet> wallets, CallbackNotifier callback) {
|
||||
List<Wallet> validWallets = wallets.stream().filter(Wallet::isValid).collect(Collectors.toList());
|
||||
|
||||
List<String> outputDescriptors = new ArrayList<>();
|
||||
Set<String> outputDescriptors = new LinkedHashSet<>();
|
||||
for(Wallet wallet : validWallets) {
|
||||
OutputDescriptor receiveOutputDescriptor = OutputDescriptor.getOutputDescriptor(wallet, KeyPurpose.RECEIVE);
|
||||
outputDescriptors.add(receiveOutputDescriptor.toString(false, false));
|
||||
|
@ -89,7 +89,7 @@ public class Bwt {
|
|||
* @param gapLimit desired gap limit beyond last used address
|
||||
* @param callback object receiving notifications
|
||||
*/
|
||||
private void start(List<String> outputDescriptors, Integer rescanSince, Boolean forceRescan, Integer gapLimit, CallbackNotifier callback) {
|
||||
private void start(Collection<String> outputDescriptors, Integer rescanSince, Boolean forceRescan, Integer gapLimit, CallbackNotifier callback) {
|
||||
BwtConfig bwtConfig = new BwtConfig();
|
||||
bwtConfig.network = Network.get() == Network.MAINNET ? "bitcoin" : Network.get().getName();
|
||||
|
||||
|
@ -188,7 +188,7 @@ public class Bwt {
|
|||
public Boolean createWalletIfMissing;
|
||||
|
||||
@SerializedName("descriptors")
|
||||
public List<String> descriptors;
|
||||
public Collection<String> descriptors;
|
||||
|
||||
@SerializedName("xpubs")
|
||||
public String xpubs;
|
||||
|
|
Loading…
Reference in a new issue