diff --git a/validator/tick/models.go b/validator/tick/models.go index d936713..a9316a5 100644 --- a/validator/tick/models.go +++ b/validator/tick/models.go @@ -24,7 +24,7 @@ func qubicToProto(tickData types.TickData) (*protobuff.TickData, error) { Epoch: uint32(tickData.Epoch), TickNumber: tickData.Tick, Timestamp: uint64(timestamp), - VarStruct: tickData.UnionData[:], + VarStruct: varStructToProto(tickData.UnionData), TimeLock: tickData.Timelock[:], TransactionIds: transactionIds, ContractFees: contractFeesToProto(tickData.ContractFees), @@ -59,3 +59,11 @@ func contractFeesToProto(contractFees [1024]int64) []int64 { } return protoContractFees } + +func varStructToProto(varStruct [256]byte) []byte { + if varStruct == [256]byte{} { + return []byte{} + } + + return varStruct[:] +}