Skip to content

Commit 0d84f0a

Browse files
committed
common: fixed forkHashes for Yolov3, fixed bug in hardforkForForkHash() not returning the correct forkHash (but: null) when hardforks with the same forkHashes found (applies with hardforks occuring on the same block number)
1 parent 9203918 commit 0d84f0a

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

packages/common/src/chains/yolov3.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,52 +31,52 @@
3131
{
3232
"name": "chainstart",
3333
"block": 0,
34-
"forkHash": "0xfc64ec04"
34+
"forkHash": "0xa308affe"
3535
},
3636
{
3737
"name": "homestead",
3838
"block": 0,
39-
"forkHash": "0x97c2c34c"
39+
"forkHash": "0xa308affe"
4040
},
4141
{
4242
"name": "tangerineWhistle",
4343
"block": 0,
44-
"forkHash": "0x7a64da13"
44+
"forkHash": "0xa308affe"
4545
},
4646
{
4747
"name": "spuriousDragon",
4848
"block": 0,
49-
"forkHash": "0x3edd5b10"
49+
"forkHash": "0xa308affe"
5050
},
5151
{
5252
"name": "byzantium",
5353
"block": 0,
54-
"forkHash": "0xa00bc324"
54+
"forkHash": "0xa308affe"
5555
},
5656
{
5757
"name": "constantinople",
5858
"block": 0,
59-
"forkHash": "0x668db0af"
59+
"forkHash": "0xa308affe"
6060
},
6161
{
6262
"name": "petersburg",
6363
"block": 0,
64-
"forkHash": "0x668db0af"
64+
"forkHash": "0xa308affe"
6565
},
6666
{
6767
"name": "istanbul",
6868
"block": 0,
69-
"forkHash": "0x879d6e30"
69+
"forkHash": "0xa308affe"
7070
},
7171
{
7272
"name": "muirGlacier",
7373
"block": 0,
74-
"forkHash": "0xe029e991"
74+
"forkHash": "0xa308affe"
7575
},
7676
{
7777
"name": "berlin",
7878
"block": 0,
79-
"forkHash": "0x00000000"
79+
"forkHash": "0xa308affe"
8080
}
8181
],
8282
"bootstrapNodes": [

packages/common/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ export default class Common extends EventEmitter {
635635
const resArray = this.hardforks().filter((hf: any) => {
636636
return hf.forkHash === forkHash
637637
})
638-
return resArray.length === 1 ? resArray[0] : null
638+
return resArray.length >= 1 ? resArray[resArray.length - 1] : null
639639
}
640640

641641
/**

0 commit comments

Comments
 (0)