diff --git a/ledger/allegra.go b/ledger/allegra.go index 5b5f517a..a9f0679b 100644 --- a/ledger/allegra.go +++ b/ledger/allegra.go @@ -114,6 +114,11 @@ func (h *AllegraBlockHeader) Era() Era { type AllegraTransactionBody struct { ShelleyTransactionBody + Update struct { + cbor.StructAsArray + ProtocolParamUpdates map[Blake2b224]AllegraProtocolParameterUpdate + Epoch uint64 + } `cbor:"6,keyasint,omitempty"` ValidityIntervalStart uint64 `cbor:"8,keyasint,omitempty"` } @@ -191,6 +196,14 @@ func (t *AllegraTransaction) Cbor() []byte { return cborData } +type AllegraProtocolParameters struct { + ShelleyProtocolParameters +} + +type AllegraProtocolParameterUpdate struct { + ShelleyProtocolParameterUpdate +} + func NewAllegraBlockFromCbor(data []byte) (*AllegraBlock, error) { var allegraBlock AllegraBlock if _, err := cbor.Decode(data, &allegraBlock); err != nil { diff --git a/protocol/localstatequery/client.go b/protocol/localstatequery/client.go index 603de351..8c35293b 100644 --- a/protocol/localstatequery/client.go +++ b/protocol/localstatequery/client.go @@ -354,6 +354,12 @@ func (c *Client) GetCurrentProtocolParams() (CurrentProtocolParamsResult, error) return nil, err } return result[0], nil + case ledger.EraIdAllegra: + result := []ledger.AllegraProtocolParameters{} + if err := c.runQuery(query, &result); err != nil { + return nil, err + } + return result[0], nil case ledger.EraIdShelley: result := []ledger.ShelleyProtocolParameters{} if err := c.runQuery(query, &result); err != nil {