echovl / cardano-go

Go module for the Cardano Blockchain
GNU General Public License v3.0
51 stars 27 forks source link

Deserialize not working for Amount.Inputs #30

Closed frogchocolatebarpie closed 2 years ago

frogchocolatebarpie commented 2 years ago

This unit test is setting transaction body inputs to empty https://github.com/echovl/cardano-go/blob/fd832fe8c7114cf9ea81b549b562bdfaab50aeb8/tx_test.go#L84? Any problem with serializing/deserializing for the map in cbor?

visopsys commented 2 years ago

@echovl any reason why you omit the Amount field in the TxInput struct?

https://github.com/echovl/cardano-go/blob/master/tx.go#L90

echovl commented 2 years ago

The serialized txInput doesn't contain the amount field, it's there only for the building process.

https://github.com/input-output-hk/cardano-ledger/blob/master/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L69

frogchocolatebarpie commented 2 years ago

@echovl Thank you for your support! Keep going on bro.