From ac8cc0e101e73b4ca233c3cdd8c5ff2cdcb980a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jev=20Bj=C3=B6rsell?= Date: Mon, 2 Mar 2026 17:28:32 -0800 Subject: [PATCH] Fix proto_024 ManagerMetadata missing core.ManagerOperationMetadata methods proto_024_PtTALLiN.ManagerMetadata was defined as a new struct (needed because it uses proto_024's own InternalOperationResult type) but was missing GetResult() and GetInternalOperationResults(). Without these, *ManagerMetadata[T] does not satisfy core.ManagerOperationMetadata, so collectMilligasAndStorage silently returns (0, 0) and teztool.Fill sets gas_limit=0 and storage_limit=0 on all operations. Add the missing methods and a compile-time interface satisfaction check to prevent this class of regression. Verified against live PtTALLiNt shadownet run_operation response: consumed_milligas now correctly extracted. --- protocol/proto_024_PtTALLiN/operations.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/protocol/proto_024_PtTALLiN/operations.go b/protocol/proto_024_PtTALLiN/operations.go index b94f13a..f025e30 100644 --- a/protocol/proto_024_PtTALLiN/operations.go +++ b/protocol/proto_024_PtTALLiN/operations.go @@ -355,6 +355,19 @@ type ManagerMetadata[T core.ManagerOperationResult] struct { InternalOperationResults []InternalOperationResult `tz:"dyn" json:"internal_operation_results"` } +var _ core.ManagerOperationMetadata = (*ManagerMetadata[ConsumedGasResult])(nil) + +func (m *ManagerMetadata[T]) GetResult() core.ManagerOperationResult { + return m.OperationResult +} +func (m *ManagerMetadata[T]) GetInternalOperationResults() []core.InternalOperationResult { + out := make([]core.InternalOperationResult, len(m.InternalOperationResults)) + for i, r := range m.InternalOperationResults { + out[i] = r + } + return out +} + type InternalOperationResult interface { core.InternalOperationResult }