Merge pull request #90 from filecoin-project/hook-up-miner-rpc-apis
export both apis for miners
This commit is contained in:
commit
b601fd12f7
@ -15,6 +15,9 @@
|
||||
go_proxy_url="http://localhost:8081"
|
||||
registry_type="aws"
|
||||
|
||||
[global.run_config]
|
||||
exposed_ports = ["6060", "1234", "2345"]
|
||||
|
||||
[global.run.test_params]
|
||||
clients = "10"
|
||||
miners = "3"
|
||||
|
@ -15,6 +15,9 @@
|
||||
go_proxy_url="http://localhost:8081"
|
||||
registry_type="aws"
|
||||
|
||||
[global.run_config]
|
||||
exposed_ports = ["6060", "1234", "2345"]
|
||||
|
||||
[global.run.test_params]
|
||||
clients = "3"
|
||||
miners = "1"
|
||||
|
@ -15,6 +15,9 @@
|
||||
go_proxy_url="http://localhost:8081"
|
||||
registry_type="aws"
|
||||
|
||||
[global.run_config]
|
||||
exposed_ports = ["6060", "1234", "2345"]
|
||||
|
||||
[global.run.test_params]
|
||||
clients = "3"
|
||||
miners = "2"
|
||||
|
@ -15,6 +15,9 @@
|
||||
go_proxy_url="http://localhost:8081"
|
||||
registry_type="aws"
|
||||
|
||||
[global.run_config]
|
||||
exposed_ports = ["6060", "1234", "2345"]
|
||||
|
||||
[global.run.test_params]
|
||||
clients = "1"
|
||||
miners = "1"
|
||||
|
@ -12,6 +12,9 @@
|
||||
[global.build_config]
|
||||
enable_go_build_cache = true
|
||||
|
||||
[global.run_config]
|
||||
exposed_ports = ["6060", "1234", "2345"]
|
||||
|
||||
[global.build]
|
||||
selectors = ["testground"]
|
||||
|
||||
|
@ -42,6 +42,7 @@ instances = { min = 1, max = 100, default = 5 }
|
||||
|
||||
# Params relevant to pubsub tracing
|
||||
enable_pubsub_tracer = { type = "bool", default = false }
|
||||
mining_mode = { type = "enum", default = "synchronized", options = ["synchronized", "natural"] }
|
||||
|
||||
[[testcases]]
|
||||
name = "drand-halting"
|
||||
|
@ -170,6 +170,7 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) {
|
||||
node.Online(),
|
||||
node.Repo(nodeRepo),
|
||||
withGenesis(genesisMsg.Genesis),
|
||||
withApiEndpoint("/ip4/127.0.0.1/tcp/1234"),
|
||||
withListenAddress(minerIP),
|
||||
withBootstrapper(genesisMsg.Bootstrapper),
|
||||
withPubsubConfig(false, pubsubTracer),
|
||||
@ -191,7 +192,7 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) {
|
||||
node.Online(),
|
||||
node.Repo(minerRepo),
|
||||
node.Override(new(api.FullNode), n.FullApi),
|
||||
withApiEndpoint("/ip4/127.0.0.1/tcp/1234"),
|
||||
withApiEndpoint("/ip4/127.0.0.1/tcp/2345"),
|
||||
withMinerListenAddress(minerIP),
|
||||
}
|
||||
|
||||
@ -282,7 +283,12 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) {
|
||||
|
||||
m := &LotusMiner{n, t}
|
||||
|
||||
err = m.startStorageMinerAPIServer(minerRepo, n.MinerApi)
|
||||
err = startClientAPIServer(nodeRepo, n.FullApi)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = startStorageMinerAPIServer(minerRepo, n.MinerApi)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -358,7 +364,7 @@ func (m *LotusMiner) RunDefault() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LotusMiner) startStorageMinerAPIServer(repo *repo.MemRepo, minerApi api.StorageMiner) error {
|
||||
func startStorageMinerAPIServer(repo *repo.MemRepo, minerApi api.StorageMiner) error {
|
||||
mux := mux.NewRouter()
|
||||
|
||||
rpcServer := jsonrpc.NewServer()
|
||||
|
Loading…
Reference in New Issue
Block a user