Upgrade images (#2)
* Fixing Imports * Updating Quorum and Constellation Images
This commit is contained in:
parent
c1f8d1ab55
commit
10f7056e6c
4
Makefile
4
Makefile
|
@ -1,5 +1,5 @@
|
||||||
CURDIR = $(shell pwd)
|
CURDIR = $(shell pwd)
|
||||||
GOPATH= $(dir $(abspath $(dir $(abspath $(dir ${CURDIR})))))
|
#GOPATH= $(dir $(abspath $(dir $(abspath $(dir ${CURDIR})))))
|
||||||
GOBIN = $(CURDIR)/build/bin
|
GOBIN = $(CURDIR)/build/bin
|
||||||
GO ?= latest
|
GO ?= latest
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ istanbul:
|
||||||
|
|
||||||
load-testing:
|
load-testing:
|
||||||
@echo "Run load testing"
|
@echo "Run load testing"
|
||||||
@CURDIR=$(CURDIR) go test -v github.com/getamis/istanbul-tools/tests/load/... --timeout 1h
|
@CURDIR=$(CURDIR) go test -v github.com/jpmorganchase/istanbul-tools/tests/load/... --timeout 1h
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build/bin/
|
rm -rf build/bin/
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/jpmorganchase/istanbul-tools/genesis"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GenesisChart struct {
|
type GenesisChart struct {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package charts
|
package charts
|
||||||
|
|
||||||
import (
|
import (
|
||||||
logging "github.com/getamis/istanbul-tools/log"
|
logging "github.com/jpmorganchase/istanbul-tools/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.New()
|
var log = logging.New()
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/common"
|
"github.com/jpmorganchase/istanbul-tools/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StaticNodesChart struct {
|
type StaticNodesChart struct {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
logging "github.com/istanbul-tools/log"
|
logging "github.com/jpmorganchase/istanbul-tools/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.New()
|
var log = logging.New()
|
||||||
|
|
|
@ -22,10 +22,10 @@ import (
|
||||||
|
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
|
|
||||||
"github.com/istanbul-tools/cmd/istanbul/extra"
|
"github.com/jpmorganchase/istanbul-tools/cmd/istanbul/extra"
|
||||||
"github.com/istanbul-tools/cmd/istanbul/setup"
|
"github.com/jpmorganchase/istanbul-tools/cmd/istanbul/reinit"
|
||||||
"github.com/istanbul-tools/cmd/istanbul/reinit"
|
"github.com/jpmorganchase/istanbul-tools/cmd/istanbul/setup"
|
||||||
"github.com/istanbul-tools/cmd/utils"
|
"github.com/jpmorganchase/istanbul-tools/cmd/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -37,7 +37,7 @@ func main() {
|
||||||
app.Commands = []cli.Command{
|
app.Commands = []cli.Command{
|
||||||
extra.ExtraCommand,
|
extra.ExtraCommand,
|
||||||
setup.SetupCommand,
|
setup.SetupCommand,
|
||||||
reinit.ReinitCommand,
|
reinit.ReinitCommand,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := app.Run(os.Args); err != nil {
|
if err := app.Run(os.Args); err != nil {
|
||||||
|
|
|
@ -30,8 +30,8 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/ethereum/go-ethereum/rlp"
|
||||||
"github.com/istanbul-tools/genesis"
|
"github.com/jpmorganchase/istanbul-tools/genesis"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -29,9 +29,9 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
"github.com/ethereum/go-ethereum/p2p/discover"
|
||||||
istcommon "github.com/istanbul-tools/common"
|
istcommon "github.com/jpmorganchase/istanbul-tools/common"
|
||||||
"github.com/istanbul-tools/docker/compose"
|
"github.com/jpmorganchase/istanbul-tools/docker/compose"
|
||||||
"github.com/istanbul-tools/genesis"
|
"github.com/jpmorganchase/istanbul-tools/genesis"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/cmd/utils"
|
"github.com/jpmorganchase/istanbul-tools/cmd/utils"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
logging "github.com/istanbul-tools/log"
|
logging "github.com/jpmorganchase/istanbul-tools/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.New()
|
var log = logging.New()
|
||||||
|
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
|
|
||||||
"github.com/istanbul-tools/client"
|
"github.com/jpmorganchase/istanbul-tools/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -33,8 +33,9 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/phayes/freeport"
|
"github.com/phayes/freeport"
|
||||||
|
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/jpmorganchase/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/jpmorganchase/istanbul-tools/docker/service"
|
||||||
|
"github.com/jpmorganchase/istanbul-tools/genesis"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -42,6 +43,8 @@ const (
|
||||||
veryLightScryptN = 2
|
veryLightScryptN = 2
|
||||||
veryLightScryptP = 1
|
veryLightScryptP = 1
|
||||||
defaultPassword = ""
|
defaultPassword = ""
|
||||||
|
|
||||||
|
ArbitraryNetworkId = "2018"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NodeIncubator interface {
|
type NodeIncubator interface {
|
||||||
|
@ -100,6 +103,7 @@ func NewDefaultBlockchain(network *DockerNetwork, numOfValidators int) (bc *bloc
|
||||||
Unlock(0),
|
Unlock(0),
|
||||||
Password("password.txt"),
|
Password("password.txt"),
|
||||||
Logging(false),
|
Logging(false),
|
||||||
|
Verbosity(5),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +127,10 @@ func NewDefaultBlockchainWithFaulty(network *DockerNetwork, numOfNormal int, num
|
||||||
SyncMode("full"),
|
SyncMode("full"),
|
||||||
Unlock(0),
|
Unlock(0),
|
||||||
Password("password.txt"),
|
Password("password.txt"),
|
||||||
Logging(false)}
|
Logging(false),
|
||||||
|
Verbosity(5),
|
||||||
|
NetworkID(ArbitraryNetworkId),
|
||||||
|
}
|
||||||
normalOpts := make([]Option, len(commonOpts), len(commonOpts)+2)
|
normalOpts := make([]Option, len(commonOpts), len(commonOpts)+2)
|
||||||
copy(normalOpts, commonOpts[:])
|
copy(normalOpts, commonOpts[:])
|
||||||
normalOpts = append(normalOpts, ImageRepository("quay.io/amis/geth"), ImageTag("istanbul_develop"))
|
normalOpts = append(normalOpts, ImageRepository("quay.io/amis/geth"), ImageTag("istanbul_develop"))
|
||||||
|
@ -191,13 +198,17 @@ func NewQuorumBlockchain(network *DockerNetwork, ctn ConstellationNetwork, optio
|
||||||
func NewDefaultQuorumBlockchain(network *DockerNetwork, ctn ConstellationNetwork) (bc *blockchain) {
|
func NewDefaultQuorumBlockchain(network *DockerNetwork, ctn ConstellationNetwork) (bc *blockchain) {
|
||||||
return NewQuorumBlockchain(network,
|
return NewQuorumBlockchain(network,
|
||||||
ctn,
|
ctn,
|
||||||
ImageRepository("quay.io/amis/quorum"),
|
ImageRepository(service.QuorumDockerImage),
|
||||||
ImageTag("feature_istanbul"),
|
ImageTag(service.QuorumDockerImageTag),
|
||||||
DataDir("/data"),
|
DataDir("/data"),
|
||||||
WebSocket(),
|
WebSocket(),
|
||||||
WebSocketAddress("0.0.0.0"),
|
WebSocketAddress("0.0.0.0"),
|
||||||
WebSocketAPI("admin,eth,net,web3,personal,miner,istanbul"),
|
WebSocketAPI("admin,eth,net,web3,personal,miner,istanbul"),
|
||||||
WebSocketOrigin("*"),
|
WebSocketOrigin("*"),
|
||||||
|
RPCAddress("0.0.0.0"),
|
||||||
|
RPCPort(8980),
|
||||||
|
RPC(),
|
||||||
|
RPCAPI("admin,eth,miner,istanbul"),
|
||||||
NAT("any"),
|
NAT("any"),
|
||||||
NoDiscover(),
|
NoDiscover(),
|
||||||
Etherbase("1a9afb711302c5f83b5902843d1c007a1a137632"),
|
Etherbase("1a9afb711302c5f83b5902843d1c007a1a137632"),
|
||||||
|
@ -206,6 +217,8 @@ func NewDefaultQuorumBlockchain(network *DockerNetwork, ctn ConstellationNetwork
|
||||||
Unlock(0),
|
Unlock(0),
|
||||||
Password("password.txt"),
|
Password("password.txt"),
|
||||||
Logging(false),
|
Logging(false),
|
||||||
|
Verbosity(5),
|
||||||
|
NetworkID(ArbitraryNetworkId),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,10 +244,12 @@ func NewDefaultQuorumBlockchainWithFaulty(network *DockerNetwork, ctn Constellat
|
||||||
Password("password.txt"),
|
Password("password.txt"),
|
||||||
Logging(false),
|
Logging(false),
|
||||||
IsQuorum(true),
|
IsQuorum(true),
|
||||||
|
Verbosity(5),
|
||||||
|
NetworkID(ArbitraryNetworkId),
|
||||||
}
|
}
|
||||||
normalOpts := make([]Option, len(commonOpts), len(commonOpts)+2)
|
normalOpts := make([]Option, len(commonOpts), len(commonOpts)+2)
|
||||||
copy(normalOpts, commonOpts[:])
|
copy(normalOpts, commonOpts[:])
|
||||||
normalOpts = append(normalOpts, ImageRepository("quay.io/amis/quorum"), ImageTag("feature_istanbul"))
|
normalOpts = append(normalOpts, ImageRepository(service.QuorumDockerImage), ImageTag(service.QuorumDockerImageTag))
|
||||||
faultyOpts := make([]Option, len(commonOpts), len(commonOpts)+3)
|
faultyOpts := make([]Option, len(commonOpts), len(commonOpts)+3)
|
||||||
copy(faultyOpts, commonOpts[:])
|
copy(faultyOpts, commonOpts[:])
|
||||||
faultyOpts = append(faultyOpts, ImageRepository("quay.io/amis/quorum_faulty"), ImageTag("latest"), FaultyMode(1))
|
faultyOpts = append(faultyOpts, ImageRepository("quay.io/amis/quorum_faulty"), ImageTag("latest"), FaultyMode(1))
|
||||||
|
@ -398,6 +413,7 @@ func (bc *blockchain) CreateNodes(num int, options ...Option) (nodes []Ethereum,
|
||||||
}
|
}
|
||||||
opts = append(opts, HostDataDir(dataDir))
|
opts = append(opts, HostDataDir(dataDir))
|
||||||
opts = append(opts, HostWebSocketPort(freeport.GetPort()))
|
opts = append(opts, HostWebSocketPort(freeport.GetPort()))
|
||||||
|
opts = append(opts, HostRPCPort(freeport.GetPort()))
|
||||||
opts = append(opts, HostIP(ips[i]))
|
opts = append(opts, HostIP(ips[i]))
|
||||||
opts = append(opts, DockerNetworkName(bc.dockerNetwork.Name()))
|
opts = append(opts, DockerNetworkName(bc.dockerNetwork.Name()))
|
||||||
|
|
||||||
|
@ -502,6 +518,7 @@ func (bc *blockchain) setupValidators(ips []net.IP, keys []*ecdsa.PrivateKey, of
|
||||||
}
|
}
|
||||||
opts = append(opts, HostDataDir(dataDir))
|
opts = append(opts, HostDataDir(dataDir))
|
||||||
opts = append(opts, HostWebSocketPort(freeport.GetPort()))
|
opts = append(opts, HostWebSocketPort(freeport.GetPort()))
|
||||||
|
opts = append(opts, HostRPCPort(freeport.GetPort()))
|
||||||
opts = append(opts, Key(keys[i]))
|
opts = append(opts, Key(keys[i]))
|
||||||
opts = append(opts, HostIP(ips[i]))
|
opts = append(opts, HostIP(ips[i]))
|
||||||
|
|
||||||
|
@ -588,8 +605,8 @@ func NewConstellationNetwork(network *DockerNetwork, numOfValidators int, option
|
||||||
|
|
||||||
func NewDefaultConstellationNetwork(network *DockerNetwork, numOfValidators int) (ctn *constellationNetwork) {
|
func NewDefaultConstellationNetwork(network *DockerNetwork, numOfValidators int) (ctn *constellationNetwork) {
|
||||||
return NewConstellationNetwork(network, numOfValidators,
|
return NewConstellationNetwork(network, numOfValidators,
|
||||||
CTImageRepository("quay.io/amis/constellation"),
|
CTImageRepository(service.ConstellationDockerImage),
|
||||||
CTImageTag("latest"),
|
CTImageTag(service.ConstellationDockerImageTag),
|
||||||
CTWorkDir("/ctdata"),
|
CTWorkDir("/ctdata"),
|
||||||
CTLogging(false),
|
CTLogging(false),
|
||||||
CTKeyName("node"),
|
CTKeyName("node"),
|
||||||
|
|
|
@ -33,7 +33,7 @@ import (
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
"github.com/docker/go-connections/nat"
|
"github.com/docker/go-connections/nat"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/common"
|
"github.com/jpmorganchase/istanbul-tools/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
//TODO: refactor this with ethereum options?
|
//TODO: refactor this with ethereum options?
|
||||||
|
|
|
@ -20,6 +20,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
|
"github.com/jpmorganchase/istanbul-tools/docker/service"
|
||||||
"github.com/phayes/freeport"
|
"github.com/phayes/freeport"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -43,8 +44,8 @@ func TestConstellationContainer(t *testing.T) {
|
||||||
port := freeport.GetPort()
|
port := freeport.GetPort()
|
||||||
|
|
||||||
ct := NewConstellation(dockerClient,
|
ct := NewConstellation(dockerClient,
|
||||||
CTImageRepository("quay.io/amis/constellation"),
|
CTImageRepository(service.ConstellationDockerImage),
|
||||||
CTImageTag("latest"),
|
CTImageTag(service.ConstellationDockerImageTag),
|
||||||
CTHost(ip, port),
|
CTHost(ip, port),
|
||||||
CTDockerNetworkName(dockerNetwork.Name()),
|
CTDockerNetworkName(dockerNetwork.Name()),
|
||||||
CTWorkDir("/data"),
|
CTWorkDir("/data"),
|
||||||
|
|
|
@ -42,9 +42,9 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
"github.com/ethereum/go-ethereum/p2p/discover"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/client"
|
"github.com/jpmorganchase/istanbul-tools/client"
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/jpmorganchase/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/jpmorganchase/istanbul-tools/genesis"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package container
|
package container
|
||||||
|
|
||||||
import (
|
import (
|
||||||
logging "github.com/getamis/istanbul-tools/log"
|
logging "github.com/jpmorganchase/istanbul-tools/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.New()
|
var log = logging.New()
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/crypto/sha3"
|
"github.com/ethereum/go-ethereum/crypto/sha3"
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/ethereum/go-ethereum/rlp"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/cmd/istanbul/extra"
|
"github.com/jpmorganchase/istanbul-tools/cmd/istanbul/extra"
|
||||||
)
|
)
|
||||||
|
|
||||||
func sigHash(header *types.Header) (hash common.Hash) {
|
func sigHash(header *types.Header) (hash common.Hash) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/istanbul-tools/docker/service"
|
"github.com/jpmorganchase/istanbul-tools/docker/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Compose interface {
|
type Compose interface {
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/istanbul-tools/docker/service"
|
"github.com/jpmorganchase/istanbul-tools/docker/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
type quorum struct {
|
type quorum struct {
|
||||||
|
|
|
@ -23,6 +23,11 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
ConstellationDockerImage = "quorumengineering/constellation"
|
||||||
|
ConstellationDockerImageTag = "latest"
|
||||||
|
)
|
||||||
|
|
||||||
type Constellation struct {
|
type Constellation struct {
|
||||||
Identity int
|
Identity int
|
||||||
Name string
|
Name string
|
||||||
|
@ -79,9 +84,9 @@ func (c Constellation) String() string {
|
||||||
return result.String()
|
return result.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
var constellationTemplate = `{{ .Name }}:
|
var constellationTemplate = fmt.Sprintf(`{{ .Name }}:
|
||||||
hostname: {{ .Name }}
|
hostname: {{ .Name }}
|
||||||
image: quay.io/amis/constellation:latest
|
image: %s:%s
|
||||||
ports:
|
ports:
|
||||||
- '{{ .Port }}:{{ .Port }}'
|
- '{{ .Port }}:{{ .Port }}'
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -107,4 +112,4 @@ var constellationTemplate = `{{ .Name }}:
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
ipv4_address: {{ .IP }}
|
ipv4_address: {{ .IP }}
|
||||||
restart: always`
|
restart: always`, ConstellationDockerImage, ConstellationDockerImageTag)
|
||||||
|
|
|
@ -22,6 +22,11 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
QuorumDockerImage = "quorumengineering/quorum"
|
||||||
|
QuorumDockerImageTag = "2.1.1"
|
||||||
|
)
|
||||||
|
|
||||||
type Quorum struct {
|
type Quorum struct {
|
||||||
*Validator
|
*Validator
|
||||||
Constellation *Constellation
|
Constellation *Constellation
|
||||||
|
@ -50,9 +55,9 @@ func (q Quorum) String() string {
|
||||||
return result.String()
|
return result.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
var quorumTemplate = `{{ .Name }}:
|
var quorumTemplate = fmt.Sprintf(`{{ .Name }}:
|
||||||
hostname: {{ .Name }}
|
hostname: {{ .Name }}
|
||||||
image: quay.io/amis/quorum:feature_istanbul
|
image: %s:%s
|
||||||
ports:
|
ports:
|
||||||
- '{{ .Port }}:30303'
|
- '{{ .Port }}:30303'
|
||||||
- '{{ .RPCPort }}:8545'
|
- '{{ .RPCPort }}:8545'
|
||||||
|
@ -92,4 +97,4 @@ var quorumTemplate = `{{ .Name }}:
|
||||||
app_net:
|
app_net:
|
||||||
ipv4_address: {{ .IP }}
|
ipv4_address: {{ .IP }}
|
||||||
restart: always
|
restart: always
|
||||||
{{ .Constellation }}`
|
{{ .Constellation }}`, QuorumDockerImage, QuorumDockerImageTag)
|
||||||
|
|
|
@ -28,7 +28,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/ethereum/go-ethereum/params"
|
||||||
|
|
||||||
"github.com/istanbul-tools/common"
|
"github.com/jpmorganchase/istanbul-tools/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package genesis
|
package genesis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
logging "github.com/istanbul-tools/log"
|
logging "github.com/jpmorganchase/istanbul-tools/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.New()
|
var log = logging.New()
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/ethereum/go-ethereum/core"
|
||||||
|
|
||||||
"github.com/istanbul-tools/cmd/istanbul/extra"
|
"github.com/jpmorganchase/istanbul-tools/cmd/istanbul/extra"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Option func(*core.Genesis)
|
type Option func(*core.Genesis)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package: github.com/getamis/istanbul-tools
|
package: github.com/jpmorganchase/istanbul-tools
|
||||||
import:
|
import:
|
||||||
- package: github.com/ethereum/go-ethereum
|
- package: github.com/ethereum/go-ethereum
|
||||||
version: istanbul/develop
|
version: istanbul/develop
|
||||||
|
|
|
@ -24,9 +24,9 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/charts"
|
"github.com/jpmorganchase/istanbul-tools/charts"
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/jpmorganchase/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewBlockchain(numOfValidators int, numOfExtraAccounts int, gaslimit uint64, isQourum bool, options ...Option) (bc *blockchain) {
|
func NewBlockchain(numOfValidators int, numOfExtraAccounts int, gaslimit uint64, isQourum bool, options ...Option) (bc *blockchain) {
|
||||||
|
|
|
@ -32,10 +32,10 @@ import (
|
||||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||||
|
|
||||||
"github.com/getamis/go-ethereum/crypto"
|
"github.com/getamis/go-ethereum/crypto"
|
||||||
"github.com/getamis/istanbul-tools/charts"
|
"github.com/jpmorganchase/istanbul-tools/charts"
|
||||||
"github.com/getamis/istanbul-tools/client"
|
"github.com/jpmorganchase/istanbul-tools/client"
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/jpmorganchase/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewEthereum(options ...Option) *ethereum {
|
func NewEthereum(options ...Option) *ethereum {
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
package k8s
|
package k8s
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/getamis/istanbul-tools/charts"
|
"github.com/jpmorganchase/istanbul-tools/charts"
|
||||||
"github.com/getamis/istanbul-tools/common"
|
"github.com/jpmorganchase/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/jpmorganchase/istanbul-tools/genesis"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleK8SEthereum() {
|
func ExampleK8SEthereum() {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package k8s
|
package k8s
|
||||||
|
|
||||||
import (
|
import (
|
||||||
logging "github.com/getamis/istanbul-tools/log"
|
logging "github.com/jpmorganchase/istanbul-tools/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.New()
|
var log = logging.New()
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/jpmorganchase/istanbul-tools/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RichMan interface {
|
type RichMan interface {
|
||||||
|
|
|
@ -25,8 +25,8 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/client"
|
"github.com/jpmorganchase/istanbul-tools/client"
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/jpmorganchase/istanbul-tools/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Transactor interface {
|
type Transactor interface {
|
||||||
|
|
|
@ -27,8 +27,8 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/client"
|
"github.com/jpmorganchase/istanbul-tools/client"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SnapshotStopper func()
|
type SnapshotStopper func()
|
||||||
|
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/client"
|
"github.com/jpmorganchase/istanbul-tools/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type metricClient struct {
|
type metricClient struct {
|
||||||
|
|
|
@ -22,9 +22,9 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/client"
|
"github.com/jpmorganchase/istanbul-tools/client"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/k8s"
|
"github.com/jpmorganchase/istanbul-tools/k8s"
|
||||||
)
|
)
|
||||||
|
|
||||||
type metricEthereum struct {
|
type metricEthereum struct {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package metrics
|
package metrics
|
||||||
|
|
||||||
import (
|
import (
|
||||||
logging "github.com/getamis/istanbul-tools/log"
|
logging "github.com/jpmorganchase/istanbul-tools/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.New()
|
var log = logging.New()
|
||||||
|
|
|
@ -24,8 +24,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("Block synchronization testing", func() {
|
var _ = Describe("Block synchronization testing", func() {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("TFS-05: Byzantine Faulty", func() {
|
var _ = Describe("TFS-05: Byzantine Faulty", func() {
|
||||||
|
|
|
@ -25,8 +25,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("TFS-02: Dynamic validators addition/removal testing", func() {
|
var _ = Describe("TFS-02: Dynamic validators addition/removal testing", func() {
|
||||||
|
|
|
@ -28,9 +28,9 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/jpmorganchase/istanbul-tools/genesis"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("TFS-01: General consensus", func() {
|
var _ = Describe("TFS-01: General consensus", func() {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("TFS-07: Gossip Network", func() {
|
var _ = Describe("TFS-07: Gossip Network", func() {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Example
|
// Example
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("TFS-04: Non-Byzantine Faulty", func() {
|
var _ = Describe("TFS-04: Non-Byzantine Faulty", func() {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("TFS-03: Recoverability testing", func() {
|
var _ = Describe("TFS-03: Recoverability testing", func() {
|
||||||
|
|
|
@ -27,11 +27,11 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/jpmorganchase/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/k8s"
|
"github.com/jpmorganchase/istanbul-tools/k8s"
|
||||||
"github.com/getamis/istanbul-tools/metrics"
|
"github.com/jpmorganchase/istanbul-tools/metrics"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("TPS-01: Large amount of transactions", func() {
|
var _ = Describe("TPS-01: Large amount of transactions", func() {
|
||||||
|
|
|
@ -24,8 +24,9 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/docker/service"
|
||||||
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("Block synchronization testing", func() {
|
var _ = Describe("Block synchronization testing", func() {
|
||||||
|
@ -62,14 +63,15 @@ var _ = Describe("Block synchronization testing", func() {
|
||||||
Expect(ok).To(BeTrue())
|
Expect(ok).To(BeTrue())
|
||||||
|
|
||||||
nodes, err = incubator.CreateNodes(numberOfNodes,
|
nodes, err = incubator.CreateNodes(numberOfNodes,
|
||||||
container.ImageRepository("quay.io/amis/geth"),
|
container.ImageRepository(service.QuorumDockerImage),
|
||||||
container.ImageTag("istanbul_develop"),
|
container.ImageTag(service.QuorumDockerImageTag),
|
||||||
container.DataDir("/data"),
|
container.DataDir("/data"),
|
||||||
container.WebSocket(),
|
container.WebSocket(),
|
||||||
container.WebSocketAddress("0.0.0.0"),
|
container.WebSocketAddress("0.0.0.0"),
|
||||||
container.WebSocketAPI("admin,eth,net,web3,personal,miner"),
|
container.WebSocketAPI("admin,eth,net,web3,personal,miner"),
|
||||||
container.WebSocketOrigin("*"),
|
container.WebSocketOrigin("*"),
|
||||||
container.NAT("any"),
|
container.NAT("any"),
|
||||||
|
container.NetworkID(container.ArbitraryNetworkId),
|
||||||
)
|
)
|
||||||
|
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("QFS-05: Byzantine Faulty", func() {
|
var _ = Describe("QFS-05: Byzantine Faulty", func() {
|
||||||
|
@ -112,7 +112,7 @@ var _ = Describe("QFS-05: Byzantine Faulty", func() {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
close(done)
|
close(done)
|
||||||
}, 60)
|
}, 120)
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -25,8 +25,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("QFS-02: Dynamic validators addition/removal testing", func() {
|
var _ = Describe("QFS-02: Dynamic validators addition/removal testing", func() {
|
||||||
|
|
|
@ -28,9 +28,9 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/jpmorganchase/istanbul-tools/genesis"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("QFS-01: General consensus", func() {
|
var _ = Describe("QFS-01: General consensus", func() {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("QFS-07: Gossip Network", func() {
|
var _ = Describe("QFS-07: Gossip Network", func() {
|
||||||
|
|
|
@ -17,19 +17,21 @@
|
||||||
package functional
|
package functional
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
|
"github.com/jpmorganchase/istanbul-tools/docker/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
var dockerNetwork *container.DockerNetwork
|
var dockerNetwork *container.DockerNetwork
|
||||||
|
|
||||||
func TestQuorumIstanbul(t *testing.T) {
|
func TestQuorumIstanbul(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecs(t, "Quorum Istanbul Test Suite")
|
RunSpecs(t, fmt.Sprintf("Quorum Istanbul Test Suite\nUsing %s:%s and %s:%s", service.QuorumDockerImage, service.QuorumDockerImageTag, service.ConstellationDockerImage, service.ConstellationDockerImageTag))
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = BeforeSuite(func() {
|
var _ = BeforeSuite(func() {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("QFS-04: Non-Byzantine Faulty", func() {
|
var _ = Describe("QFS-04: Non-Byzantine Faulty", func() {
|
||||||
|
|
|
@ -28,8 +28,8 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/getamis/istanbul-tools/client"
|
"github.com/jpmorganchase/istanbul-tools/client"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/tests"
|
"github.com/jpmorganchase/istanbul-tools/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("QFS-03: Recoverability testing", func() {
|
var _ = Describe("QFS-03: Recoverability testing", func() {
|
||||||
|
|
|
@ -19,14 +19,18 @@ package tests
|
||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/jpmorganchase/istanbul-tools/container"
|
||||||
|
"github.com/onsi/ginkgo"
|
||||||
)
|
)
|
||||||
|
|
||||||
func WaitFor(geths []container.Ethereum, waitFn func(eth container.Ethereum, wg *sync.WaitGroup)) {
|
func WaitFor(geths []container.Ethereum, waitFn func(eth container.Ethereum, wg *sync.WaitGroup)) {
|
||||||
wg := new(sync.WaitGroup)
|
wg := new(sync.WaitGroup)
|
||||||
for _, g := range geths {
|
for _, g := range geths {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go waitFn(g, wg)
|
go func(_g container.Ethereum) {
|
||||||
|
defer ginkgo.GinkgoRecover()
|
||||||
|
waitFn(_g, wg)
|
||||||
|
}(g)
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue