Skip to content

Commit

Permalink
Feat: cleaned up more
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Apr 1, 2022
1 parent 9a2609e commit 187fd88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/refactored/utxo/transactionid.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,26 @@ func (t *TransactionID) FromBase58(base58String string) (err error) {
return
}

// FromMarshalUtil unmarshals an TransactionID using a MarshalUtil (for easier unmarshalling).
// NewFromMarshalUtil unmarshals an TransactionID using a MarshalUtil (for easier unmarshalling).
func (t TransactionID) NewFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (txID TransactionID, err error) {
outputIDBytes, err := marshalUtil.ReadBytes(TransactionIDLength)
if err != nil {
err = errors.Errorf("failed to parse TransactionID (%v): %w", err, cerrors.ErrParseBytesFailed)
return
}
copy(t[:], outputIDBytes)
copy(txID[:], outputIDBytes)

return
}

// FromMarshalUtil unmarshals an TransactionID using a MarshalUtil (for easier unmarshalling).
func (t TransactionID) FromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (err error) {
func (t *TransactionID) FromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (err error) {
outputIDBytes, err := marshalUtil.ReadBytes(TransactionIDLength)
if err != nil {
err = errors.Errorf("failed to parse TransactionID (%v): %w", err, cerrors.ErrParseBytesFailed)
return
}
copy(t[:], outputIDBytes)
copy((*t)[:], outputIDBytes)

return
}
Expand Down

0 comments on commit 187fd88

Please sign in to comment.