File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ class BC_API witness
126126private:
127127 // TODO: move to config serialization wrapper.
128128 static witness from_string (const std::string& mnemonic) NOEXCEPT;
129- static constexpr size_t element_size (const chunk_cptr& element) NOEXCEPT;
130129 static constexpr bool is_annex_pattern (const chunk_cptrs& stack) NOEXCEPT;
130+ static inline size_t element_size (const chunk_cptr& element) NOEXCEPT;
131131 static inline bool drop_annex (chunk_cptrs& stack) NOEXCEPT;
132132
133133 void assign_data (reader& source, bool prefix) NOEXCEPT;
Original file line number Diff line number Diff line change @@ -29,14 +29,6 @@ namespace chain {
2929BC_PUSH_WARNING (SMART_PTR_NOT_NEEDED)
3030BC_PUSH_WARNING (NO_VALUE_OR_CONST_REF_SHARED_PTR)
3131
32- // static/private
33- constexpr size_t witness::element_size (const chunk_cptr& element) NOEXCEPT
34- {
35- // Each witness is prefixed with number of elements [bip144].
36- const auto size = element->size ();
37- return ceilinged_add (variable_size (size), size);
38- };
39-
4032// static
4133constexpr bool witness::is_push_size (const chunk_cptrs& stack) NOEXCEPT
4234{
@@ -82,6 +74,14 @@ inline bool witness::drop_annex(chunk_cptrs& stack) NOEXCEPT
8274 return false ;
8375}
8476
77+ // static/private
78+ inline size_t witness::element_size (const chunk_cptr& element) NOEXCEPT
79+ {
80+ // Each witness is prefixed with number of elements [bip144].
81+ const auto size = element->size ();
82+ return ceilinged_add (variable_size (size), size);
83+ };
84+
8585BC_POP_WARNING ()
8686BC_POP_WARNING ()
8787
You can’t perform that action at this time.
0 commit comments