Skip to content

Commit

Permalink
fix: if keys are updated, save later to avoid deadlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering committed Oct 4, 2024
1 parent 471bb89 commit 1081f92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/bitcoinj/wallet/Wallet.java
Original file line number Diff line number Diff line change
Expand Up @@ -5946,7 +5946,7 @@ public void addReceivingFromFriendKeyChain(FriendKeyChain chain) {
receivingFromFriendsGroup = FriendKeyChainGroup.friendlybuilder(params).build();
}
receivingFromFriendsGroup.addAndActivateHDChain(chain);
saveNow();
saveLater();
} finally {
keyChainGroupLock.unlock();
}
Expand All @@ -5966,7 +5966,7 @@ public void addSendingToFriendKeyChain(FriendKeyChain chain) {
sendingToFriendsGroup = FriendKeyChainGroup.friendlybuilder(params).build();
}
sendingToFriendsGroup.addAndActivateHDChain(chain);
saveNow();
saveLater();
} finally {
keyChainGroupLock.unlock();
}
Expand Down

0 comments on commit 1081f92

Please sign in to comment.