do not query dao for channels closed a long time ago

This commit is contained in:
Carsten Otto
2021-12-30 15:38:47 +01:00
parent 462d3651da
commit 2d49014f4d
13 changed files with 94 additions and 41 deletions

View File

@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.time.Duration;
import java.time.Period;
import java.util.List;
import java.util.Set;
@@ -91,7 +92,7 @@ public class NodeController {
@Timed
@GetMapping("/fee-report/last-days/{lastDays}")
public FeeReportDto getFeeReport(@PathVariable Pubkey pubkey, @PathVariable int lastDays) {
return FeeReportDto.createFromModel(feeService.getFeeReportForPeer(pubkey, Period.ofDays(lastDays)));
return FeeReportDto.createFromModel(feeService.getFeeReportForPeer(pubkey, Duration.ofDays(lastDays)));
}
private List<ChannelId> toSortedList(Set<? extends Channel> channels) {