Merge pull request #51 from getamis/feature/docker_sync_mode
container: use full sync mode
This commit is contained in:
commit
5e00f9837c
|
@ -8,7 +8,7 @@ matrix:
|
|||
sudo: required
|
||||
go: 1.7.6
|
||||
script:
|
||||
- go test -parallel 4 $(glide novendor | grep -v "\.\/tests\/\.\.\.") && cd tests && ginkgo -p
|
||||
- go test -parallel 4 $(glide novendor | grep -v "\.\/tests\/\.\.\.") && cd tests && ginkgo
|
||||
|
||||
# These are the latest Go versions.
|
||||
- os: linux
|
||||
|
@ -16,7 +16,7 @@ matrix:
|
|||
sudo: required
|
||||
go: 1.8.3
|
||||
script:
|
||||
- go test -parallel 4 $(glide novendor | grep -v "\.\/tests\/\.\.\.") && cd tests && ginkgo -p
|
||||
- go test -parallel 4 $(glide novendor | grep -v "\.\/tests\/\.\.\.") && cd tests && ginkgo
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
|
|
@ -68,6 +68,7 @@ func NewDefaultBlockchain(numOfValidators int) (bc *blockchain) {
|
|||
NoDiscover(),
|
||||
Etherbase("1a9afb711302c5f83b5902843d1c007a1a137632"),
|
||||
Mine(),
|
||||
SyncMode("full"),
|
||||
Logging(false),
|
||||
)
|
||||
}
|
||||
|
@ -83,6 +84,7 @@ func NewDefaultBlockchainWithFaulty(numOfNormal int, numOfFaulty int) (bc *block
|
|||
NoDiscover(),
|
||||
Etherbase("1a9afb711302c5f83b5902843d1c007a1a137632"),
|
||||
Mine(),
|
||||
SyncMode("full"),
|
||||
Logging(false)}
|
||||
normalOpts := make([]Option, len(commonOpts), len(commonOpts)+2)
|
||||
copy(normalOpts, commonOpts[:])
|
||||
|
|
|
@ -245,3 +245,10 @@ func FaultyMode(mode int) Option {
|
|||
eth.flags = append(eth.flags, fmt.Sprintf("%d", mode))
|
||||
}
|
||||
}
|
||||
|
||||
func SyncMode(mode string) Option {
|
||||
return func(eth *ethereum) {
|
||||
eth.flags = append(eth.flags, "--"+utils.SyncModeFlag.Name)
|
||||
eth.flags = append(eth.flags, mode)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue