add wallet export to electrum personal server config file

This commit is contained in:
Craig Raw
2022-08-22 14:33:03 +02:00
parent bd421e877a
commit d139ca2706
7 changed files with 118 additions and 4 deletions
@@ -364,7 +364,7 @@ public class ElectrumServer {
}
private int getGapLimitSize(Wallet wallet, Map<WalletNode, Set<BlockTransactionHash>> nodeTransactionMap) {
int highestIndex = nodeTransactionMap.keySet().stream().map(WalletNode::getIndex).max(Comparator.comparing(Integer::valueOf)).orElse(-1);
int highestIndex = nodeTransactionMap.keySet().stream().filter(node -> node.getDerivation().size() > 1).map(WalletNode::getIndex).max(Comparator.comparing(Integer::valueOf)).orElse(-1);
return highestIndex + wallet.getGapLimit() + 1;
}