mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
* sharding: Fix mainchain.Client starting RPC connections during ShardEthereum.New. Fix graceful stop * sharding: Just pass the cli.Context rather than keeping it on the shardEthereum * sharding: add doc * sharding: add doc * Sharding: remove exgtra newline * sharding:fix lint Former-commit-id: fdaf8160245d9233b693f685ba6078e4b15fa279 [formerly f7fa71912b7d8340ede6cd08b357056fafbab014] Former-commit-id: 0e8bfbbc579451178f76263364fdbcd00a91d651
27 lines
528 B
Go
27 lines
528 B
Go
package node
|
|
|
|
import (
|
|
"flag"
|
|
"testing"
|
|
|
|
"github.com/ethereum/go-ethereum/sharding"
|
|
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
)
|
|
|
|
// Verifies that ShardEthereum implements the Node interface.
|
|
var _ = sharding.Node(&ShardEthereum{})
|
|
|
|
// Test that the sharding node can build with default flag values.
|
|
func TestNode_Builds(t *testing.T) {
|
|
app := cli.NewApp()
|
|
set := flag.NewFlagSet("test", 0)
|
|
|
|
context := cli.NewContext(app, set, nil)
|
|
|
|
_, err := New(context)
|
|
if err != nil {
|
|
t.Fatalf("Failed to create ShardEthereum: %v", err)
|
|
}
|
|
}
|