Skip to content

Commit 11a29cf

Browse files
authored
Merge pull request #1129 from ethereumjs/yolov3-client
Common: add YoloV3 network
2 parents 5620105 + 59eacbf commit 11a29cf

File tree

22 files changed

+14617
-3049
lines changed

22 files changed

+14617
-3049
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "ethereum-tests"]
22
path = packages/ethereum-tests
3-
url = https://github.com/qbzzt/tests.git
3+
url = https://github.com/ethereum/tests.git
44
branch = develop

package-lock.json

Lines changed: 14221 additions & 3019 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/block/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@ethereumjs/common": "^2.1.0",
4343
"merkle-patricia-tree": "^4.1.0",
4444
"@ethereumjs/tx": "^3.0.2",
45-
"ethereumjs-util": "^7.0.8"
45+
"ethereumjs-util": "^7.0.9"
4646
},
4747
"devDependencies": {
4848
"@ethereumjs/config-coverage": "^2.0.0",

packages/blockchain/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@ethereumjs/common": "^2.1.0",
4141
"@ethereumjs/ethash": "^1.0.0",
4242
"debug": "^2.2.0",
43-
"ethereumjs-util": "^7.0.8",
43+
"ethereumjs-util": "^7.0.9",
4444
"level-mem": "^5.0.1",
4545
"lru-cache": "^5.1.1",
4646
"rlp": "^2.2.3",

packages/client/lib/net/protocol/ethprotocol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class EthProtocol extends Protocol {
150150
*/
151151
decodeStatus(status: any): any {
152152
return {
153-
networkId: bufferToInt(status.networkId),
153+
networkId: new BN(status.networkId),
154154
td: new BN(status.td),
155155
bestHash: status.bestHash,
156156
genesisHash: status.genesisHash,

packages/client/lib/net/protocol/lesprotocol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export class LesProtocol extends Protocol {
202202
}
203203
}
204204
return {
205-
networkId: bufferToInt(status.networkId),
205+
networkId: new BN(status.networkId),
206206
headTd: new BN(status.headTd),
207207
headHash: status.headHash,
208208
headNum: new BN(status.headNum),

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"merkle-patricia-tree": "^4.1.0",
5959
"@ethereumjs/vm": "^5.1.0",
6060
"chalk": "^2.4.2",
61-
"ethereumjs-util": "^7.0.8",
61+
"ethereumjs-util": "^7.0.9",
6262
"fs-extra": "^7.0.1",
6363
"it-pipe": "^1.1.0",
6464
"it-pushable": "^1.4.2",

packages/client/test/net/protocol/ethprotocol.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ tape('[EthProtocol]', (t) => {
6464
genesisHash: '0xbb',
6565
})
6666
t.ok(
67-
status.networkId === 1 &&
67+
status.networkId.toNumber() === 1 &&
6868
status.td.toNumber() === 100 &&
6969
status.bestHash === '0xaa' &&
7070
status.genesisHash === '0xbb',

packages/client/test/net/protocol/lesprotocol.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ tape('[LesProtocol]', (t) => {
8282
status = { ...status, networkId: [0x01] }
8383
status = p.decodeStatus(status)
8484
t.ok(
85-
status.networkId === 1 &&
85+
status.networkId.toNumber() === 1 &&
8686
status.headTd.toString('hex') === '64' &&
8787
status.headHash === '0xaa' &&
8888
status.headNum.toNumber() === 100 &&

packages/common/src/chains/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ropsten from './ropsten.json'
44
import rinkeby from './rinkeby.json'
55
import kovan from './kovan.json'
66
import goerli from './goerli.json'
7+
import yolov3 from './yolov3.json'
78

89
/**
910
* @hidden
@@ -15,13 +16,15 @@ export function _getInitializedChains(customChains?: Chain[]) {
1516
'4': 'rinkeby',
1617
'42': 'kovan',
1718
'5': 'goerli',
19+
'34180983699157880': 'yolov3',
1820
}
1921
const chains: any = {
2022
mainnet,
2123
ropsten,
2224
rinkeby,
2325
kovan,
2426
goerli,
27+
yolov3,
2528
}
2629
if (customChains) {
2730
for (const chain of customChains) {

0 commit comments

Comments
 (0)