mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-11 02:24:30 +00:00
remove signed offers with common key images
This commit is contained in:
parent
9c2308f7a3
commit
f78a9cd907
1 changed files with 7 additions and 0 deletions
|
@ -764,6 +764,13 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||||
private void addSignedOffer(SignedOffer signedOffer) {
|
private void addSignedOffer(SignedOffer signedOffer) {
|
||||||
log.info("Adding SignedOffer offer for offer {}", signedOffer.getOfferId());
|
log.info("Adding SignedOffer offer for offer {}", signedOffer.getOfferId());
|
||||||
synchronized (signedOffers) {
|
synchronized (signedOffers) {
|
||||||
|
|
||||||
|
// remove signed offers with common key images
|
||||||
|
for (String keyImage : signedOffer.getReserveTxKeyImages()) {
|
||||||
|
removeSignedOffers(keyImage);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add new signed offer
|
||||||
signedOffers.add(signedOffer);
|
signedOffers.add(signedOffer);
|
||||||
signedOfferKeyImagePoller.addKeyImages(signedOffer.getReserveTxKeyImages());
|
signedOfferKeyImagePoller.addKeyImages(signedOffer.getReserveTxKeyImages());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue