Skip to content

Commit

Permalink
fix(IDataBlock): do not serialize DataStream
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Nov 1, 2018
1 parent 20ba3ca commit 0b18af5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DagNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

Expand All @@ -15,6 +16,7 @@ namespace Ipfs
/// A <b>DagNode</b> has opaque <see cref="DagNode.DataBytes"/>
/// and a set of navigable <see cref="DagNode.Links"/>.
/// </remarks>
[DataContract]
public class DagNode : IMerkleNode<IMerkleLink>
{
Cid id;
Expand Down Expand Up @@ -70,9 +72,11 @@ public DagNode(CodedInputStream stream)
}

/// <inheritdoc />
[DataMember]
public IEnumerable<IMerkleLink> Links { get; private set; }

/// <inheritdoc />
[DataMember]
public byte[] DataBytes { get; private set; }

/// <inheritdoc />
Expand All @@ -87,6 +91,7 @@ public Stream DataStream
/// <summary>
/// The serialised size in bytes of the node.
/// </summary>
[DataMember]
public long Size
{
get
Expand All @@ -100,6 +105,7 @@ public long Size
}

/// <inheritdoc />
[DataMember]
public Cid Id
{
get
Expand Down

0 comments on commit 0b18af5

Please sign in to comment.