mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-27 02:26:44 +00:00
make gson use treesets
This commit is contained in:
parent
b9ef670e61
commit
b1299f6abf
2 changed files with 5 additions and 5 deletions
|
@ -26,7 +26,7 @@ public class Wallet {
|
||||||
private ScriptType scriptType;
|
private ScriptType scriptType;
|
||||||
private Policy defaultPolicy;
|
private Policy defaultPolicy;
|
||||||
private List<Keystore> keystores = new ArrayList<>();
|
private List<Keystore> keystores = new ArrayList<>();
|
||||||
private final Set<WalletNode> purposeNodes = new TreeSet<>();
|
private final TreeSet<WalletNode> purposeNodes = new TreeSet<>();
|
||||||
private final Map<Sha256Hash, BlockTransaction> transactions = new HashMap<>();
|
private final Map<Sha256Hash, BlockTransaction> transactions = new HashMap<>();
|
||||||
private Integer storedBlockHeight;
|
private Integer storedBlockHeight;
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ import java.util.stream.Collectors;
|
||||||
public class WalletNode implements Comparable<WalletNode> {
|
public class WalletNode implements Comparable<WalletNode> {
|
||||||
private final String derivationPath;
|
private final String derivationPath;
|
||||||
private String label;
|
private String label;
|
||||||
private Set<WalletNode> children = new TreeSet<>();
|
private TreeSet<WalletNode> children = new TreeSet<>();
|
||||||
private Set<BlockTransactionHashIndex> transactionOutputs = new TreeSet<>();
|
private TreeSet<BlockTransactionHashIndex> transactionOutputs = new TreeSet<>();
|
||||||
|
|
||||||
private transient KeyPurpose keyPurpose;
|
private transient KeyPurpose keyPurpose;
|
||||||
private transient int index = -1;
|
private transient int index = -1;
|
||||||
|
@ -90,7 +90,7 @@ public class WalletNode implements Comparable<WalletNode> {
|
||||||
return children == null ? null : Collections.unmodifiableSet(children);
|
return children == null ? null : Collections.unmodifiableSet(children);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChildren(Set<WalletNode> children) {
|
public void setChildren(TreeSet<WalletNode> children) {
|
||||||
this.children = children;
|
this.children = children;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public class WalletNode implements Comparable<WalletNode> {
|
||||||
return transactionOutputs == null ? null : Collections.unmodifiableSet(transactionOutputs);
|
return transactionOutputs == null ? null : Collections.unmodifiableSet(transactionOutputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTransactionOutputs(Set<BlockTransactionHashIndex> transactionOutputs) {
|
public void setTransactionOutputs(TreeSet<BlockTransactionHashIndex> transactionOutputs) {
|
||||||
this.transactionOutputs = transactionOutputs;
|
this.transactionOutputs = transactionOutputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue