Skip to content

Commit

Permalink
Merge pull request #112 from ObsidianLabs/develop
Browse files Browse the repository at this point in the history
feat: update conflux to 2 version
  • Loading branch information
flowfire authored Apr 14, 2022
2 parents 91bd0f3 + 51f41a2 commit 8f00e10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ReduxApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let dockerImageForNode = process.env.DOCKER_IMAGE_NODE
// dockerImageForNode += '-arm64'
// }
instanceChannel.node = new DockerImageChannel(dockerImageForNode, {
filter: v => semver.valid(v) && semver.gte(v, '1.0.0') && v.indexOf('2.') !== 0 && semver.lt(v, '2.0.0') && v.indexOf('testnet') === -1 && v.indexOf('mainnet') === -1
filter: v => semver.valid(v) && semver.gte(v, '1.0.0') && v.indexOf('testnet') === -1 && v.indexOf('mainnet') === -1
})

export default class ReduxApp extends Component {
Expand Down
10 changes: 8 additions & 2 deletions src/components/Routes/Network/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ let dockerImageForNode = process.env.DOCKER_IMAGE_NODE
nodeManager.generateCommand = ({ name, version }) => {
const containerName = `${process.env.PROJECT}-${name}-${version}`

let configFile = 'default.toml'

if (version.startsWith('2.')) {
configFile = 'conflux.toml'
}

return [
'docker run -it --rm',
`pwd && docker run -it --rm`,
`--name ${containerName}`,
`-p 12535:12535`,
`-p 12536:12536`,
Expand All @@ -22,7 +28,7 @@ nodeManager.generateCommand = ({ name, version }) => {
`-w /${process.env.PROJECT}-node`,
`--entrypoint conflux`,
`${dockerImageForNode}:${version}`,
`--config default.toml`
`--config ${configFile}`,
].join(' ')
}

Expand Down

0 comments on commit 8f00e10

Please sign in to comment.