Browse Source

Matching renames

analysis
Pieter Wuille 5 years ago
parent
commit
f04c4bc70d
  1. 5
      bitcoin/script/miniscript.cpp
  2. 4
      bitcoin/script/miniscript.h

5
bitcoin/script/miniscript.cpp

@ -31,10 +31,7 @@ Type SanitizeType(Type e) {
return e;
}
Type CalcSimpleType(NodeType nodetype, Type x, Type y, Type z, const std::vector<Type>& sub_types, uint32_t k, size_t data_size, size_t n_subs, size_t n_keys) {
// Sanity check on sigops
// if (GetOps() > 201) return ""_mst;
Type ComputeType(NodeType nodetype, Type x, Type y, Type z, const std::vector<Type>& sub_types, uint32_t k, size_t data_size, size_t n_subs, size_t n_keys) {
// Sanity check on data
if (nodetype == NodeType::SHA256 || nodetype == NodeType::HASH256) {
assert(data_size == 32);

4
bitcoin/script/miniscript.h

@ -195,7 +195,7 @@ enum class NodeType {
namespace internal {
//! Helper function for Node::CalcType.
Type CalcSimpleType(NodeType nodetype, Type x, Type y, Type z, const std::vector<Type>& sub_types, uint32_t k, size_t data_size, size_t n_subs, size_t n_keys);
Type ComputeType(NodeType nodetype, Type x, Type y, Type z, const std::vector<Type>& sub_types, uint32_t k, size_t data_size, size_t n_subs, size_t n_keys);
//! Helper function for Node::CalcScriptLen.
size_t ComputeScriptLen(NodeType nodetype, Type sub0typ, size_t subsize, uint32_t k, size_t n_subs, size_t n_keys);
@ -332,7 +332,7 @@ private:
Type y = subs.size() > 1 ? subs[1]->GetType() : ""_mst;
Type z = subs.size() > 2 ? subs[2]->GetType() : ""_mst;
return SanitizeType(CalcSimpleType(nodetype, x, y, z, sub_types, k, data.size(), subs.size(), keys.size()));
return SanitizeType(ComputeType(nodetype, x, y, z, sub_types, k, data.size(), subs.size(), keys.size()));
}
//! Internal code for ToScript.

Loading…
Cancel
Save