Create SingleNodeConnCB class for RPC tests

(cherry picked from commit 5fa66e4682)
This commit is contained in:
Alex Morcos
2016-03-04 15:08:10 -05:00
committed by MarcoFalke
parent 4fd6008105
commit 4ffd309b25
3 changed files with 41 additions and 15 deletions

View File

@@ -27,20 +27,6 @@ generator that returns TestInstance objects. See below for definition.
global mininode_lock
def wait_until(predicate, attempts=float('inf'), timeout=float('inf')):
attempt = 0
elapsed = 0
while attempt < attempts and elapsed < timeout:
with mininode_lock:
if predicate():
return True
attempt += 1
elapsed += 0.05
time.sleep(0.05)
return False
class RejectResult(object):
'''
Outcome that expects rejection of a transaction or block.