Skip to content

Commit

Permalink
fix: update based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Jul 8, 2024
1 parent 25443d3 commit 965c1ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
17 changes: 14 additions & 3 deletions node/cmd/dal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,27 @@ package main

import (
"context"
"os"
"os/signal"
"syscall"

"bisonai.com/orakl/node/pkg/dal"
"github.com/rs/zerolog/log"
)

func main() {
ctx := context.Background()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
go func() {
<-sigCh
cancel()
}()

err := dal.Run(ctx)
if err != nil {
log.Fatal().Err(err).Msg("Failed to start dal")
return
log.Fatal().Err(err).Msg("Failed to start DAL")
}
}
3 changes: 2 additions & 1 deletion node/pkg/dal/tests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ func testPublishData(ctx context.Context, submissionData aggregator.SubmissionDa
}

func generateSampleSubmissionData(configId int32, value int64, timestamp time.Time, round int32, symbol string) (*aggregator.SubmissionData, error) {
ctx := context.Background()
sampleGlobalAggregate := aggregator.GlobalAggregate{
ConfigID: configId,
Value: value,
Timestamp: timestamp,
Round: round,
}

signHelper, err := helper.NewSignHelper("")
signHelper, err := helper.NewSigner(ctx)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 965c1ac

Please sign in to comment.