Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Commit

Permalink
migrate from ethereum-common to ethereumjs-common
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippLgh committed Mar 31, 2020
1 parent bf45d77 commit 2a826c7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"async": "^2.6.0",
"chalk": "^2.4.2",
"coveralls": "^3.0.0",
"ethereum-common": "~0.2.0",
"ethereumjs-block": "^1.3.0",
"ethereumjs-common": "^1.5.0",
"nyc": "^11.4.1",
"prettier": "^1.17.0",
"standard": "*",
Expand Down
6 changes: 4 additions & 2 deletions src/examples/peer-communication-les.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ const GENESIS_HASH = Buffer.from(
'hex',
)

const BOOTNODES = require('ethereum-common')
.bootstrapNodes.filter((node: any) => {
const Common = require('ethereumjs-common').default
const config = new Common('mainnet')
const bootstrapNodes = config.bootstrapNodes()
const BOOTNODES = bootstrapNodes.filter((node: any) => {
return node.chainId === CHAIN_ID
})
.map((node: any) => {
Expand Down
6 changes: 4 additions & 2 deletions src/examples/peer-communication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import rlp from 'rlp-encoding'
const PRIVATE_KEY = randomBytes(32)
const CHAIN_ID = 1

const BOOTNODES = require('ethereum-common')
.bootstrapNodes.filter((node: any) => {
const Common = require('ethereumjs-common').default
const config = new Common('mainnet')
const bootstrapNodes = config.bootstrapNodes()
const BOOTNODES = bootstrapNodes.filter((node: any) => {
return node.chainId === CHAIN_ID
})
.map((node: any) => {
Expand Down
6 changes: 5 additions & 1 deletion src/examples/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import chalk from 'chalk'
import { DPT } from '../index'

const PRIVATE_KEY = 'd772e3d6a001a38064dd23964dd2836239fa0e6cec8b28972a87460a17210fe9'
const BOOTNODES = require('ethereum-common').bootstrapNodes.map((node: any) => {

const Common = require('ethereumjs-common').default
const config = new Common('mainnet')
const bootstrapNodes = config.bootstrapNodes()
const BOOTNODES = bootstrapNodes.map((node: any) => {
return {
address: node.ip,
udpPort: node.port,
Expand Down

0 comments on commit 2a826c7

Please sign in to comment.