forked from cerc-io/ipld-eth-server
Add a PaymentsManager with Nitro node initialization
This commit is contained in:
+4
-9
@@ -26,7 +26,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cerc-io/ipld-eth-server/v5/pkg/log"
|
||||
"github.com/cerc-io/ipld-eth-server/v5/pkg/nitro"
|
||||
"github.com/cerc-io/ipld-eth-server/v5/pkg/payments"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
"github.com/mailgun/groupcache/v2"
|
||||
"github.com/spf13/cobra"
|
||||
@@ -98,11 +98,8 @@ func serve() {
|
||||
|
||||
// TODO: Create required config for Nitro node
|
||||
|
||||
// TODO: Create a new Nitro node using the config
|
||||
nitro, _ := nitro.NewNitroNode()
|
||||
|
||||
// TODO: Start the Nitro node, pass wg
|
||||
nitro.Start(wg)
|
||||
paymentsManager, _ := payments.NewPaymentsManager(true)
|
||||
paymentsManager.Start(wg)
|
||||
|
||||
shutdown := make(chan os.Signal, 1)
|
||||
signal.Notify(shutdown, os.Interrupt)
|
||||
@@ -111,9 +108,7 @@ func serve() {
|
||||
graphQL.Stop()
|
||||
}
|
||||
server.Stop()
|
||||
|
||||
// TODO: Stop nitro node
|
||||
nitro.Stop()
|
||||
paymentsManager.Stop()
|
||||
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user