#Serde different types issue

2 messages · Page 1 of 1 (latest)

crimson heron
#

I think you want InternalCommandCoinbase and InternalCommandFeeTransfer to be tuple-structs, to match the [], instead of enums.

wild lintel
#

That's what untagged is supposed to fix, but if you use untagged you have to make it a Vec:

pub enum InternalCommand {
    Coinbase(Vec<InternalCommandCoinbase>),
    FeeTransfer(Vec<InternalCommandFeeTransfer>),
}
```Or you can have it internally tagged, but unfortunately I don't think serde has this. I tried `0` but that didn't work.