Skip to content

Commit

Permalink
Removed unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww committed Jan 3, 2018
1 parent 50a0e10 commit ec9ff9c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions evm/vm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ def create_block(
vm_state = cls.get_state_class()(
chaindb=BaseChainDB({}),
block_header=block_header,
is_stateless=True,
)

witness = {}
Expand Down Expand Up @@ -439,7 +438,6 @@ def get_state(self, chaindb=None, block_header=None):
return self.get_state_class()(
chaindb,
block_header,
self.is_stateless,
)

@property
Expand Down
4 changes: 1 addition & 3 deletions evm/vm_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ class BaseVMState(object):
_chaindb = None
block_header = None
computation_class = None
is_stateless = None
access_logs = AccessLogs()
receipts = None

def __init__(self, chaindb, block_header, is_stateless):
def __init__(self, chaindb, block_header):
self._chaindb = chaindb
self.block_header = block_header
self.is_stateless = is_stateless

self.receipts = []

Expand Down
4 changes: 0 additions & 4 deletions tests/core/vm/test_vm_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def test_apply_transaction(chain_without_block_validation): # noqa: F811
vm_state = FrontierVMState(
chaindb=chaindb00,
block_header=block_header00,
is_stateless=True,
)

# Use FrontierVMState to apply transaction
Expand All @@ -91,7 +90,6 @@ def test_apply_transaction(chain_without_block_validation): # noqa: F811
vm_state1 = FrontierVMState(
chaindb=chaindb1,
block_header=block_header1,
is_stateless=True,
)

computation, block, _ = vm_state1.apply_transaction(
Expand Down Expand Up @@ -129,7 +127,6 @@ def test_apply_transaction(chain_without_block_validation): # noqa: F811
vm_state2 = FrontierVMState(
chaindb=witness_db,
block_header=block_header2,
is_stateless=True,
)
# Before applying
assert post_vm_state1.block_header.state_root != vm_state2.block_header.state_root
Expand All @@ -154,7 +151,6 @@ def test_apply_transaction(chain_without_block_validation): # noqa: F811
vm_state3 = FrontierVMState(
chaindb=witness_db,
block_header=block.header,
is_stateless=True,
)
assert vm_state3.block_header.state_root == post_vm_state1.block_header.state_root
assert vm_state3.block_header.state_root == result_block.header.state_root

0 comments on commit ec9ff9c

Please sign in to comment.