diff --git a/cmd/node/appchain.go b/cmd/node/appchain.go index 5ad7b7a..e9428ca 100644 --- a/cmd/node/appchain.go +++ b/cmd/node/appchain.go @@ -333,6 +333,11 @@ func (ap *AppChain) SendWorkerModeData(ctx context.Context, topicId uint64, resu } } + if nonce == nil { + ap.Logger.Warn().Msg("No valid WorkerDataBundles with nonces found, not sending data to the chain") + return + } + // Make 1 request per worker req := &types.MsgInsertBulkWorkerPayload{ Sender: ap.ReputerAddress, @@ -413,6 +418,11 @@ func (ap *AppChain) SendReputerModeData(ctx context.Context, topicId uint64, res } } + if nonceCurrent == nil || nonceEval == nil { + ap.Logger.Error().Uint64("topic", topicId).Msg("No valid ReputerDataBundles with nonces found, not sending data to the chain") + return + } + // Make 1 request per worker req := &types.MsgInsertBulkReputerPayload{ Sender: ap.ReputerAddress,