Skip to content

Commit a67c746

Browse files
authored
fix: retain original datum CBOR on decode (#1177)
This also updates blinklabs-io/plutigo to v0.0.10 Signed-off-by: Aurora Gaffney <[email protected]>
1 parent 137ec5c commit a67c746

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.24.1
77
require (
88
filippo.io/edwards25519 v1.1.0
99
github.com/blinklabs-io/ouroboros-mock v0.3.8
10-
github.com/blinklabs-io/plutigo v0.0.9
10+
github.com/blinklabs-io/plutigo v0.0.10
1111
github.com/btcsuite/btcd/btcutil v1.1.6
1212
github.com/fxamacker/cbor/v2 v2.9.0
1313
github.com/jinzhu/copier v0.4.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3M
55
github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
66
github.com/blinklabs-io/ouroboros-mock v0.3.8 h1:+DAt2rx0ouZUxee5DBMgZq3I1+ZdxFSHG9g3tYl/FKU=
77
github.com/blinklabs-io/ouroboros-mock v0.3.8/go.mod h1:UwQIf4KqZwO13P9d90fbi3UL/X7JaJfeEbqk+bEeFQA=
8-
github.com/blinklabs-io/plutigo v0.0.9 h1:GPMJNfaiT6/wYs8MGZUfJYQ8tSHT9y+dpdvFprPOYYg=
9-
github.com/blinklabs-io/plutigo v0.0.9/go.mod h1:L639Q8i2cSRuBhjgCHttPR0nnYwwsYVT4Btz7KpQjSw=
8+
github.com/blinklabs-io/plutigo v0.0.10 h1:h/yg65Krkzkg45AfOhbZLRgGD51zwS8RR91eQa5qDow=
9+
github.com/blinklabs-io/plutigo v0.0.10/go.mod h1:L639Q8i2cSRuBhjgCHttPR0nnYwwsYVT4Btz7KpQjSw=
1010
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
1111
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M=
1212
github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A=

ledger/babbage/babbage.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,7 @@ func (d *BabbageTransactionOutputDatumOption) UnmarshalCBOR(
408408
if _, err := cbor.Decode(tmpDatumData.DataCbor, &datumValue); err != nil {
409409
return err
410410
}
411-
d.data = &common.Datum{
412-
Data: datumValue.Data,
413-
}
411+
d.data = &datumValue
414412
default:
415413
return fmt.Errorf("unsupported datum option type: %d", datumOptionType)
416414
}

0 commit comments

Comments
 (0)