Skip to content

Commit 027b422

Browse files
committed
Merge #19: Don't write debug output "Cannot compile arg=%i as {B,W}" to stderr
1bfd709 Don't write debug output "Cannot compile arg=%i as B" to stderr (practicalswift) Pull request description: Don't write debug output `Cannot compile arg=%i as B` to `stderr`. Before: ``` $ ./miniscript <<< "thresh(2,sha256(H),sha256(H),or(sha256(H),sha256(H)))" Cannot compile arg=2 as B Failed to parse as policy or miniscript 'thresh(2,sha256(H),sha256(H),or(sha256(H),sha256(H)))' ``` After: ``` $ ./miniscript <<< "thresh(2,sha256(H),sha256(H),or(sha256(H),sha256(H)))" Failed to parse as policy or miniscript 'thresh(2,sha256(H),sha256(H),or(sha256(H),sha256(H)))' ``` Closes #9. ACKs for commit 1bfd70: sipa: ACK 1bfd709 Tree-SHA512: ff31fab76c2e31164900d76755f8c28feccef5e9e56461960b9e98c3bd513129fa8bed787f80cf22f74b7f3bcec3f2fc371c09ddb4d8ab524781bd64050525c1
2 parents c7d20ab + 1bfd709 commit 027b422

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,11 +806,11 @@ void Compile(const Strat* strat, Compilation& compilation, std::map<CompilationK
806806
for (size_t i = 0; i < strat->sub.size(); ++i) {
807807
const Compilation& comp = GetCompilation(strat->sub[i], pqs.first[i], pqs.second[i], cache);
808808
auto res_B = comp.Query("Bemdu"_mstf);
809-
if (res_B.size() == 0) {fprintf(stderr, "Cannot compile arg=%i as B\n", (int)i); return; }
809+
if (res_B.size() == 0) { return; }
810810
assert(res_B.size() == 1);
811811
Bs.push_back(std::move(res_B[0]));
812812
auto res_W = comp.Query("Wemdu"_mstf);
813-
if (res_W.size() == 0) {fprintf(stderr, "Cannot compile arg=%i as W\n", (int)i); return; }
813+
if (res_W.size() == 0) { return; }
814814
assert(res_W.size() == 1);
815815
Ws.push_back(std::move(res_W[0]));
816816
if (Ws.back().cost - Bs.back().cost > cost_diff) {

0 commit comments

Comments
 (0)