From 2b05d1fb016d24e480d1964e22d53d31116cfa8f Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Mon, 4 Nov 2024 18:21:30 +0530 Subject: [PATCH] feat: append data market to submission bytes if flag enabled --- pkgs/service/msg_server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/service/msg_server.go b/pkgs/service/msg_server.go index c4b7146..254651a 100644 --- a/pkgs/service/msg_server.go +++ b/pkgs/service/msg_server.go @@ -58,7 +58,11 @@ func (s *server) SubmitSnapshot(ctx context.Context, submission *pkgs.SnapshotSu } log.Debugln("Sending submission with ID: ", submissionId.String()) - submissionBytes := append(submissionIdBytes, subBytes...) + submissionBytes := submissionIdBytes + if config.SettingsObj.DataMarketInRequest { + submissionBytes = append(submissionBytes, []byte(config.SettingsObj.DataMarketAddress)...) + } + submissionBytes = append(submissionBytes, subBytes...) s.writeSemaphore <- struct{}{} go func() {