mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
avoid concurrent modification error
This commit is contained in:
parent
39fa65ea37
commit
72768362a5
1 changed files with 2 additions and 1 deletions
|
@ -93,7 +93,8 @@ public class WalletTransactionsEntry extends Entry {
|
||||||
|
|
||||||
private static void getWalletTransactions(Wallet wallet, Map<BlockTransaction, WalletTransaction> walletTransactionMap, WalletNode purposeNode) {
|
private static void getWalletTransactions(Wallet wallet, Map<BlockTransaction, WalletTransaction> walletTransactionMap, WalletNode purposeNode) {
|
||||||
KeyPurpose keyPurpose = purposeNode.getKeyPurpose();
|
KeyPurpose keyPurpose = purposeNode.getKeyPurpose();
|
||||||
for(WalletNode addressNode : purposeNode.getChildren()) {
|
List<WalletNode> childNodes = new ArrayList<>(purposeNode.getChildren());
|
||||||
|
for(WalletNode addressNode : childNodes) {
|
||||||
for(BlockTransactionHashIndex hashIndex : addressNode.getTransactionOutputs()) {
|
for(BlockTransactionHashIndex hashIndex : addressNode.getTransactionOutputs()) {
|
||||||
BlockTransaction inputTx = wallet.getTransactions().get(hashIndex.getHash());
|
BlockTransaction inputTx = wallet.getTransactions().get(hashIndex.getHash());
|
||||||
//A null inputTx here means the wallet is still updating - ignore as the WalletHistoryChangedEvent will run this again
|
//A null inputTx here means the wallet is still updating - ignore as the WalletHistoryChangedEvent will run this again
|
||||||
|
|
Loading…
Reference in a new issue