Skip to content

Commit 422038f

Browse files
BertBert
authored andcommitted
immediate fix for screwed GH-598-receivables-scheduling-hot-fix
1 parent 06dd374 commit 422038f

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

node/src/accountant/scanners/payable_scanner/start_scan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl StartableScanner<ScanForNewPayables, InitialTemplatesMessage> for PayableSc
3535
match qualified_payables.is_empty() {
3636
true => {
3737
self.mark_as_ended(logger);
38-
Err(StartScanError::nothing_to_process(response_skeleton_opt))
38+
Err(StartScanError::NothingToProcess)
3939
}
4040
false => {
4141
info!(

node/src/accountant/scanners/pending_payable_scanner/mod.rs

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,10 @@ impl StartableScanner<ScanForPendingPayables, RequestTransactionReceipts>
9595

9696
info!(logger, "Scanning for pending payable");
9797

98-
let tx_hashes = self
99-
.harvest_tables(logger, response_skeleton_opt)
100-
.map_err(|e| {
101-
self.mark_as_ended(logger);
102-
e
103-
})?;
98+
let tx_hashes = self.harvest_tables(logger).map_err(|e| {
99+
self.mark_as_ended(logger);
100+
e
101+
})?;
104102

105103
Ok(RequestTransactionReceipts {
106104
tx_hashes,
@@ -164,11 +162,7 @@ impl PendingPayableScanner {
164162
}
165163
}
166164

167-
fn harvest_tables(
168-
&mut self,
169-
logger: &Logger,
170-
response_skeleton_opt: Option<ResponseSkeleton>,
171-
) -> Result<Vec<TxHashByTable>, StartScanError> {
165+
fn harvest_tables(&mut self, logger: &Logger) -> Result<Vec<TxHashByTable>, StartScanError> {
172166
debug!(logger, "Harvesting sent_payable and failed_payable tables");
173167

174168
let pending_tx_hashes_opt = self.harvest_pending_payables();
@@ -178,7 +172,7 @@ impl PendingPayableScanner {
178172
pending_tx_hashes_opt.as_ref(),
179173
failure_hashes_opt.as_ref(),
180174
) {
181-
return Err(StartScanError::nothing_to_process(response_skeleton_opt));
175+
return Err(StartScanError::NothingToProcess);
182176
}
183177

184178
Self::log_records_for_receipt_check(
@@ -884,9 +878,7 @@ mod tests {
884878
};
885879
use crate::accountant::scanners::pending_payable_scanner::PendingPayableScanner;
886880
use crate::accountant::scanners::test_utils::PendingPayableCacheMock;
887-
use crate::accountant::scanners::{
888-
AutomaticError, CommonError, Scanner, StartScanError, StartableScanner,
889-
};
881+
use crate::accountant::scanners::{Scanner, StartScanError, StartableScanner};
890882
use crate::accountant::test_utils::{
891883
make_transaction_block, FailedPayableDaoMock, PayableDaoMock, PendingPayableScannerBuilder,
892884
SentPayableDaoMock,
@@ -1238,12 +1230,7 @@ mod tests {
12381230
let result = subject.start_scan(&consuming_wallet, now, None, &Logger::new("test"));
12391231

12401232
let is_scan_running = subject.scan_started_at().is_some();
1241-
assert_eq!(
1242-
result,
1243-
Err(StartScanError::Automatic(AutomaticError::Common(
1244-
CommonError::NothingToProcess
1245-
)))
1246-
);
1233+
assert_eq!(result, Err(StartScanError::NothingToProcess));
12471234
assert_eq!(is_scan_running, false);
12481235
}
12491236

0 commit comments

Comments
 (0)