Avoid negative block numbers, ref #649.

This commit is contained in:
5chdn 2017-08-25 09:25:59 +02:00
parent cab7b1f095
commit 7a946e08b6
No known key found for this signature in database
GPG Key ID: 1A40871B597F5F80
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ The Casper development and switch to proof-of-stake is delayed, the Ethash proof
#### Relax Difficulty with Fake Block Number
For the purposes of `calc_difficulty`, simply replace the use of `block.number`, as used in the exponential ice age component, with the formula:
fake_block_number = min(0, block.number - 3_000_000) if block.number >= BYZANTIUM_FORK_BLKNUM else block.number
fake_block_number = max(0, block.number - 3_000_000) if block.number >= BYZANTIUM_FORK_BLKNUM else block.number
#### Adjust Block, Uncle, and Nephew rewards
To add an issuance reduction, adjust the block reward to `new_block_reward`, where