Skip to content

Commit

Permalink
Comments, style.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Aug 21, 2024
1 parent 059d9f2 commit 590919d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/chain/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ void script::assign_data(reader& source, bool prefix) NOEXCEPT
}

valid_ = source;

// TODO: possible leak with linear arena allocation.
offset = ops_.begin();
}

Expand Down
8 changes: 4 additions & 4 deletions src/chain/witness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ void witness::assign_data(reader& source, bool prefix) NOEXCEPT
for (size_t element = 0; element < count; ++element)
{
const auto size = source.read_size(max_block_weight);
stack_.emplace_back(POINTER(data_chunk, allocator,
source.read_bytes_raw(size)));
const auto bytes = source.read_bytes_raw(size);
stack_.emplace_back(POINTER(data_chunk, allocator, bytes));
size_ = element_size(size_, stack_.back());
}
}
Expand All @@ -187,8 +187,8 @@ void witness::assign_data(reader& source, bool prefix) NOEXCEPT
while (!source.is_exhausted())
{
const auto size = source.read_size(max_block_weight);
stack_.emplace_back(POINTER(data_chunk, allocator,
source.read_bytes_raw(size)));
const auto bytes = source.read_bytes_raw(size);
stack_.emplace_back(POINTER(data_chunk, allocator, bytes));
size_ = element_size(size_, stack_.back());
}
}
Expand Down

0 comments on commit 590919d

Please sign in to comment.