1
1
# -*- coding: utf-8 -*-
2
- import gevent
3
- from gevent .lock import Semaphore
4
2
from time import time as now
3
+
5
4
import rlp
5
+ import gevent
6
+ from gevent .lock import Semaphore
6
7
from ethereum import slogging
7
8
from ethereum import _solidity
8
9
from ethereum .exceptions import InvalidTransaction
41
42
)
42
43
43
44
log = slogging .getLogger (__name__ ) # pylint: disable=invalid-name
44
-
45
-
46
45
solidity = _solidity .get_solidity () # pylint: disable=invalid-name
47
46
48
47
# Coding standard for this module:
@@ -221,7 +220,7 @@ def estimate_and_transact(classobject, callobj, *args):
221
220
222
221
class BlockChainService (object ):
223
222
""" Exposes the blockchain's state through JSON-RPC. """
224
- # pylint: disable=too-many-instance-attributes,unused-argument
223
+ # pylint: disable=too-many-instance-attributes
225
224
226
225
def __init__ (
227
226
self ,
@@ -485,7 +484,7 @@ def endpoint_by_address(self, node_address_bin):
485
484
node_address_hex = node_address_bin .encode ('hex' )
486
485
endpoint = self .proxy .findEndpointByAddress .call (node_address_hex )
487
486
488
- if endpoint is '' :
487
+ if endpoint == '' :
489
488
raise KeyError ('Unknown address {}' .format (pex (node_address_bin )))
490
489
491
490
return endpoint
@@ -507,7 +506,6 @@ def __init__(
507
506
startgas = GAS_LIMIT ,
508
507
gasprice = GAS_PRICE ,
509
508
poll_timeout = DEFAULT_POLL_TIMEOUT ):
510
- # pylint: disable=too-many-arguments
511
509
512
510
result = jsonrpc_client .call (
513
511
'eth_getCode' ,
@@ -783,7 +781,7 @@ def channels_by_participant(self, participant_address): # pylint: disable=inval
783
781
for address in address_list
784
782
]
785
783
786
- def channelnew_filter (self , from_block = None , to_block = None ): # pylint: disable=unused-argument
784
+ def channelnew_filter (self , from_block = None , to_block = None ):
787
785
""" Install a new filter for ChannelNew events.
788
786
789
787
Return:
@@ -900,7 +898,7 @@ def can_transfer(self):
900
898
self .detail (None )['our_balance' ] > 0
901
899
)
902
900
903
- def deposit (self , amount ): # pylint: disable=unused-argument
901
+ def deposit (self , amount ):
904
902
if not isinstance (amount , (int , long )):
905
903
raise ValueError ('amount needs to be an integral number.' )
906
904
0 commit comments