Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/escrow'
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Aug 8, 2023
2 parents 5c61b6d + ea84490 commit 24660c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2661,6 +2661,9 @@ public static String transferBulkWithErrors(@Me IMessageIO io, @Me JSONObject co
IMessageBuilder msg = io.create();
desc.append("Total: `" + PnwUtil.resourcesToString(totalRss) + "`\n");
desc.append("Note: `" + depositType + "`\n\n");
if (escrow_mode != null && escrow_mode != EscrowMode.NEVER) {
desc.append("Escrow Mode: `" + escrow_mode + "`\n");
}
sheet.getSheet().attach(msg, desc, true, desc.length());

key = UUID.randomUUID();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public void addBlockade(int attacker, int defender, long date, Consumer<Event> e
}

public void removeBlockade(int attacker, int defender, long date, Consumer<Event> eventConsumer) {
List<Event> events = null;
Event event = null;
synchronized (blockadeLock) {
// remove from both maps, only if the date >= existing date
Map<Integer, Long> defenders = blockaderToDefender.get(attacker);
Expand All @@ -262,15 +262,14 @@ public void removeBlockade(int attacker, int defender, long date, Consumer<Event
if (defenderMap.isEmpty()) {
defenderToBlockader.remove(defender);
if (eventConsumer != null) {
events = new LinkedList<>();
events.add(new NationBlockadedEvent(defender, attacker));
event = new NationUnblockadedEvent(defender, attacker);
}
}
}
}
}
}
if (events != null) events.forEach(eventConsumer);
if (event != null) eventConsumer.accept(event);
}

public void syncBlockades() {
Expand Down

0 comments on commit 24660c4

Please sign in to comment.