|
27 | 27 | import hashlib |
28 | 28 |
|
29 | 29 | import bitcoin.core |
| 30 | +import bitcoin.core._bignum |
30 | 31 | import bitcoin.core.key |
31 | 32 | import bitcoin.core.serialize |
32 | 33 |
|
@@ -113,7 +114,7 @@ def __init__(self, opcode, **kwargs): |
113 | 114 |
|
114 | 115 |
|
115 | 116 | def _CastToBigNum(s, err_raiser): |
116 | | - v = bitcoin.core.bignum.vch2bn(s) |
| 117 | + v = bitcoin.core._bignum.vch2bn(s) |
117 | 118 | if len(s) > MAX_NUM_SIZE: |
118 | 119 | raise err_raiser(EvalScriptError, 'CastToBigNum() : overflow') |
119 | 120 | return v |
@@ -252,7 +253,7 @@ def _UnaryOp(opcode, stack, err_raiser): |
252 | 253 | raise AssertionError( |
253 | 254 | "Unknown unary opcode encountered; this should not happen") |
254 | 255 |
|
255 | | - stack.append(bitcoin.core.bignum.bn2vch(bn)) |
| 256 | + stack.append(bitcoin.core._bignum.bn2vch(bn)) |
256 | 257 |
|
257 | 258 | # OP_LSHIFT and OP_RSHIFT are *not* included in this list as they are disabled |
258 | 259 | _ISA_BINOP = { |
@@ -340,7 +341,7 @@ def _BinOp(opcode, stack, err_raiser): |
340 | 341 |
|
341 | 342 | stack.pop() |
342 | 343 | stack.pop() |
343 | | - stack.append(bitcoin.core.bignum.bn2vch(bn)) |
| 344 | + stack.append(bitcoin.core._bignum.bn2vch(bn)) |
344 | 345 |
|
345 | 346 |
|
346 | 347 | def _CheckExec(vfExec): |
@@ -419,7 +420,7 @@ def check_args(n): |
419 | 420 |
|
420 | 421 | if sop == OP_1NEGATE or ((sop >= OP_1) and (sop <= OP_16)): |
421 | 422 | v = sop - (OP_1 - 1) |
422 | | - stack.append(bitcoin.core.bignum.bn2vch(v)) |
| 423 | + stack.append(bitcoin.core._bignum.bn2vch(v)) |
423 | 424 |
|
424 | 425 | elif sop in _ISA_BINOP: |
425 | 426 | _BinOp(sop, stack, err_raiser) |
@@ -511,7 +512,7 @@ def check_args(n): |
511 | 512 |
|
512 | 513 | elif sop == OP_DEPTH: |
513 | 514 | bn = len(stack) |
514 | | - stack.append(bitcoin.core.bignum.bn2vch(bn)) |
| 515 | + stack.append(bitcoin.core._bignum.bn2vch(bn)) |
515 | 516 |
|
516 | 517 | elif sop == OP_DROP: |
517 | 518 | check_args(1) |
@@ -631,7 +632,7 @@ def check_args(n): |
631 | 632 | elif sop == OP_SIZE: |
632 | 633 | check_args(1) |
633 | 634 | bn = len(stack[-1]) |
634 | | - stack.append(bitcoin.core.bignum.bn2vch(bn)) |
| 635 | + stack.append(bitcoin.core._bignum.bn2vch(bn)) |
635 | 636 |
|
636 | 637 | elif sop == OP_SHA1: |
637 | 638 | check_args(1) |
|
0 commit comments