miniscript: nit: don't return after assert(false)
This commit is contained in:
2 files changed
+2
-7
No files matched your search
@@ -245,7 +245,6 @@ Type ComputeType(Fragment fragment, Type x, Type y, Type z, const std::vector<Ty
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(false);
|
assert(false);
|
||||||
return ""_mst;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ComputeScriptLen(Fragment fragment, Type sub0typ, size_t subsize, uint32_t k, size_t n_subs, size_t n_keys) {
|
size_t ComputeScriptLen(Fragment fragment, Type sub0typ, size_t subsize, uint32_t k, size_t n_subs, size_t n_keys) {
|
||||||
@@ -278,7 +277,6 @@ size_t ComputeScriptLen(Fragment fragment, Type sub0typ, size_t subsize, uint32_
|
|||||||
case Fragment::THRESH: return subsize + n_subs + BuildScript(k).size();
|
case Fragment::THRESH: return subsize + n_subs + BuildScript(k).size();
|
||||||
}
|
}
|
||||||
assert(false);
|
assert(false);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::vector<Opcode>> DecomposeScript(const CScript& script)
|
std::optional<std::vector<Opcode>> DecomposeScript(const CScript& script)
|
||||||
|
|||||||
@@ -532,7 +532,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(false);
|
assert(false);
|
||||||
return {};
|
|
||||||
};
|
};
|
||||||
return TreeEval<CScript>(false, downfn, upfn);
|
return TreeEval<CScript>(false, downfn, upfn);
|
||||||
}
|
}
|
||||||
@@ -632,9 +631,9 @@ public:
|
|||||||
}
|
}
|
||||||
return std::move(str) + ")";
|
return std::move(str) + ")";
|
||||||
}
|
}
|
||||||
default: assert(false);
|
default: break;
|
||||||
}
|
}
|
||||||
return ""; // Should never be reached.
|
assert(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return TreeEvalMaybe<std::string>(false, downfn, upfn);
|
return TreeEvalMaybe<std::string>(false, downfn, upfn);
|
||||||
@@ -711,7 +710,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(false);
|
assert(false);
|
||||||
return {0, {}, {}};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal::StackSize CalcStackSize() const {
|
internal::StackSize CalcStackSize() const {
|
||||||
@@ -762,7 +760,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(false);
|
assert(false);
|
||||||
return {{}, {}};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Check whether any key is repeated.
|
/** Check whether any key is repeated.
|
||||||
|
|||||||
Reference in new issue
Block a user