extra tests for failure modes and remove CRYPTOCONDITION_OVERSIZE error state

This commit is contained in:
Scott Sadler
2018-02-19 18:24:12 -03:00
parent 456c9e72fd
commit f5cf215f71
7 changed files with 54 additions and 13 deletions

View File

@@ -2,9 +2,11 @@ from __future__ import print_function
import sys
import json
import time
import copy
import base64
import logging
import subprocess
import functools
import subprocess
class RPCError(IOError):
@@ -34,6 +36,10 @@ def run_cmd(cmd):
return proc.stdout.read()
def to_hex(s):
return base64.b16encode(s).decode('utf-8')
class Hoek(JsonClient):
def _exec(self, method, args):
cmd = ['hoek', method, json.dumps(args[0])]
@@ -111,7 +117,7 @@ def fanout_input(n):
if not hasattr(fanout_input, 'txid'):
fanout_input.txid = get_fanout_txid()
inp = {'txid': fanout_input.txid, 'idx': n, 'script': {'fulfillment': cond_alice}}
f(inp)
f(copy.deepcopy(inp))
return functools.wraps(f)(wrapper)
return decorate