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 @@ -1171,6 +1171,14 @@ def revert(self, mysnapshot):
1171
1171
self .ether_delta = mysnapshot ['ether_delta' ]
1172
1172
1173
1173
def initialize (self , parent ):
1174
+ # DAO fork
1175
+ if self .number == self .config ["DAO_FORK_BLKNUM" ]:
1176
+ dao_main_addr = utils .normalize_address (self .config ["DAO_MAIN_ADDR" ])
1177
+ for acct in map (utils .normalize_address , self .config ["DAO_ADDRESS_LIST" ]):
1178
+ self .delta_balance (dao_main_addr , self .get_balance (addr ))
1179
+ self .set_balance (addr , 0 )
1180
+ self .set_code (dao_main_addr , self .config ["DAO_NEWCODE" ])
1181
+ # Likely metropolis changes
1174
1182
if self .number == self .config ["METROPOLIS_FORK_BLKNUM" ]:
1175
1183
self .set_code (utils .normalize_address (self .config ["METROPOLIS_STATEROOT_STORE" ]), self .config ["METROPOLIS_GETTER_CODE" ])
1176
1184
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 56
56
METROPOLIS_WRAPAROUND = 65536 ,
57
57
METROPOLIS_GETTER_CODE = decode_hex ('6000355460205260206020f3' ),
58
58
METROPOLIS_DIFF_ADJUSTMENT_CUTOFF = 9 ,
59
- # Metropolis fork
59
+ # DAO fork
60
+ DAO_FORK_BLKNUM = 9999998 ,
61
+ DAO_ADDRESS_LIST = [],
62
+ DAO_MAIN_ADDR = '0xbb9bc244d798123fde783fcc1c72d3bb8c189413' ,
63
+ DAO_NEWCODE = ''
60
64
)
61
65
assert default_config ['NEPHEW_REWARD' ] == \
62
66
default_config ['BLOCK_REWARD' ] // 32
You can’t perform that action at this time.
0 commit comments