Skip to content

Commit

Permalink
Comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Aug 23, 2024
1 parent 5ff7c3e commit 935bf7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/bitcoin/system/stream/streamers/byte_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class byte_reader
/// -----------------------------------------------------------------------
/// cptr/raw overrides return nullptr if reader is or becomes invalid.
/// Non-null raw return must be destroyed using reader's allocator/arena.
/// Null raw return implies invalidated stream.

/// Read all remaining bytes to chunk.
data_chunk read_bytes() NOEXCEPT override;
Expand Down
2 changes: 2 additions & 0 deletions src/chain/operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ void operation::assign_data(reader& source) NOEXCEPT
{
code_ = any_invalid;
source.set_position(start);

// An invalid source.read_bytes_raw returns nullptr.
data_.reset(POINTER(data_chunk, allocator, source.read_bytes_raw()));
}

Expand Down

0 comments on commit 935bf7a

Please sign in to comment.