Skip to content

Commit

Permalink
Fix transfer message bindnode wrap passing pointer to pointer
Browse files Browse the repository at this point in the history
Bindnode wrap expects a pointer. A fail-fast check is introduced in
ipld/go-ipld-prime#427 which will cause a panic if the IPLD dependency
is upgraded to the head of main branch.

Avoid passing pointer-to-pointer when wrapping transfer message.

See:
- ipld/go-ipld-prime#427
  • Loading branch information
masih committed Jun 15, 2022
1 parent 3aeb4b9 commit 59f7312
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion message/message1_1prime/transfer_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (tm *TransferMessage1_1) TransferID() datatransfer.TransferID {
}

func (tm *TransferMessage1_1) toIPLD() schema.TypedNode {
return bindnode.Wrap(&tm, Prototype.TransferMessage.Type())
return bindnode.Wrap(tm, Prototype.TransferMessage.Type())
}

// ToNet serializes a transfer message type.
Expand Down

0 comments on commit 59f7312

Please sign in to comment.