Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some better logging for get_outputs_by_id failure states #2705

Merged
merged 8 commits into from
Mar 25, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions api/src/handlers/chain_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ impl OutputHandler {

let mut outputs: Vec<Output> = vec![];
for x in commitments {
if let Ok(output) = self.get_output(&x) {
outputs.push(output);
}
match self.get_output(&x) {
Ok(output) => outputs.push(output),
Err(e) => error!("{}", e),
rentenmark marked this conversation as resolved.
Show resolved Hide resolved
};
}
Ok(outputs)
}
Expand Down
12 changes: 6 additions & 6 deletions core/src/pow/cuckatoo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ mod test {

// Cuckatoo 31 Solution for Header [0u8;80] - nonce 99
static V1_31: [u64; 42] = [
0x1128e07, 0xc181131, 0x110fad36, 0x1135ddee, 0x1669c7d3, 0x1931e6ea, 0x1c0005f3, 0x1dd6ecca,
0x1e29ce7e, 0x209736fc, 0x2692bf1a, 0x27b85aa9, 0x29bb7693, 0x2dc2a047, 0x2e28650a, 0x2f381195,
0x350eb3f9, 0x3beed728, 0x3e861cbc, 0x41448cc1, 0x41f08f6d, 0x42fbc48a, 0x4383ab31, 0x4389c61f,
0x4540a5ce, 0x49a17405, 0x50372ded, 0x512f0db0, 0x588b6288, 0x5a36aa46, 0x5c29e1fe, 0x6118ab16,
0x634705b5, 0x6633d190, 0x6683782f, 0x6728b6e1, 0x67adfb45, 0x68ae2306, 0x6d60f5e1, 0x78af3c4f,
0x7dde51ab, 0x7faced21
0x1128e07, 0xc181131, 0x110fad36, 0x1135ddee, 0x1669c7d3, 0x1931e6ea, 0x1c0005f3,
0x1dd6ecca, 0x1e29ce7e, 0x209736fc, 0x2692bf1a, 0x27b85aa9, 0x29bb7693, 0x2dc2a047,
0x2e28650a, 0x2f381195, 0x350eb3f9, 0x3beed728, 0x3e861cbc, 0x41448cc1, 0x41f08f6d,
0x42fbc48a, 0x4383ab31, 0x4389c61f, 0x4540a5ce, 0x49a17405, 0x50372ded, 0x512f0db0,
0x588b6288, 0x5a36aa46, 0x5c29e1fe, 0x6118ab16, 0x634705b5, 0x6633d190, 0x6683782f,
0x6728b6e1, 0x67adfb45, 0x68ae2306, 0x6d60f5e1, 0x78af3c4f, 0x7dde51ab, 0x7faced21,
];

#[test]
Expand Down
5 changes: 4 additions & 1 deletion wallet/src/libwallet/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,10 @@ where
let parent_key_id = w.parent_key_id();
match updater::refresh_outputs(&mut *w, &parent_key_id, update_all) {
Ok(_) => true,
Err(_) => false,
Err(e) => {
error!("{:?}", e);
false
}
}
}
}
Expand Down