This repository was archived by the owner on May 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1177,6 +1177,14 @@ def revert(self, mysnapshot):
1177
1177
self .ether_delta = mysnapshot ['ether_delta' ]
1178
1178
1179
1179
def initialize (self , parent ):
1180
+ # DAO fork
1181
+ if self .number == self .config ["DAO_FORK_BLKNUM" ]:
1182
+ dao_main_addr = utils .normalize_address (self .config ["DAO_MAIN_ADDR" ])
1183
+ for acct in map (utils .normalize_address , self .config ["DAO_ADDRESS_LIST" ]):
1184
+ self .delta_balance (dao_main_addr , self .get_balance (addr ))
1185
+ self .set_balance (addr , 0 )
1186
+ self .set_code (dao_main_addr , self .config ["DAO_NEWCODE" ])
1187
+ # Likely metropolis changes
1180
1188
if self .number == self .config ["METROPOLIS_FORK_BLKNUM" ]:
1181
1189
self .set_code (utils .normalize_address (self .config ["METROPOLIS_STATEROOT_STORE" ]), self .config ["METROPOLIS_GETTER_CODE" ])
1182
1190
self .set_code (utils .normalize_address (self .config ["METROPOLIS_BLOCKHASH_STORE" ]), self .config ["METROPOLIS_GETTER_CODE" ])
Original file line number Diff line number Diff line change 54
54
METROPOLIS_WRAPAROUND = 65536 ,
55
55
METROPOLIS_GETTER_CODE = '6000355460205260206020f3' .decode ('hex' ),
56
56
METROPOLIS_DIFF_ADJUSTMENT_CUTOFF = 9 ,
57
- # Metropolis fork
57
+ # DAO fork
58
+ DAO_FORK_BLKNUM = 9999998 ,
59
+ DAO_ADDRESS_LIST = [],
60
+ DAO_MAIN_ADDR = '0xbb9bc244d798123fde783fcc1c72d3bb8c189413' ,
61
+ DAO_NEWCODE = ''
58
62
)
59
63
assert default_config ['NEPHEW_REWARD' ] == \
60
64
default_config ['BLOCK_REWARD' ] // 32
You can’t perform that action at this time.
0 commit comments