forked from ethereum/trinity
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move other block things from State -> VM
- Loading branch information
Showing
7 changed files
with
110 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,7 @@ | ||
from evm.constants import ( | ||
MAX_UNCLE_DEPTH, | ||
) | ||
from evm.validation import ( | ||
validate_lte, | ||
) | ||
from evm.vm.forks.spurious_dragon.state import SpuriousDragonState | ||
|
||
from .computation import ByzantiumComputation | ||
from .constants import ( | ||
EIP649_BLOCK_REWARD, | ||
) | ||
|
||
|
||
class ByzantiumState(SpuriousDragonState): | ||
computation_class = ByzantiumComputation | ||
|
||
@staticmethod | ||
def get_block_reward(): | ||
return EIP649_BLOCK_REWARD | ||
|
||
@staticmethod | ||
def get_uncle_reward(block_number, uncle): | ||
block_number_delta = block_number - uncle.block_number | ||
validate_lte(block_number_delta, MAX_UNCLE_DEPTH) | ||
return (8 - block_number_delta) * EIP649_BLOCK_REWARD // 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters