Skip to content

Commit 6619249

Browse files
committed
Use __all__ in bitcoin.core.scripteval
Previously was exporting the entire bitcoin.core.script namespace as well.
1 parent 638e89b commit 6619249

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

bitcoin/core/scripteval.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import bitcoin.core.key
3232
import bitcoin.core.serialize
3333

34+
# Importing everything for simplicity; note that we use __all__ at the end so
35+
# we're not exporting the whole contents of the script module.
3436
from bitcoin.core.script import *
3537

3638
nMaxNumSize = 4
@@ -762,3 +764,22 @@ def VerifySignature(txFrom, txTo, inIdx):
762764
raise VerifySignatureError("prevout hash does not match txFrom")
763765

764766
VerifyScript(txin.scriptSig, txout.scriptPubKey, txTo, inIdx)
767+
768+
769+
__all__ = (
770+
'MAX_STACK_ITEMS',
771+
'SCRIPT_VERIFY_P2SH',
772+
'SCRIPT_VERIFY_STRICTENC',
773+
'SCRIPT_VERIFY_EVEN_S',
774+
'SCRIPT_VERIFY_NOCACHE',
775+
'EvalScriptError',
776+
'MaxOpCountError',
777+
'MissingOpArgumentsError',
778+
'ArgumentsInvalidError',
779+
'VerifyOpFailedError',
780+
'EvalScript',
781+
'VerifyScriptError',
782+
'VerifyScript',
783+
'VerifySignatureError',
784+
'VerifySignature',
785+
)

0 commit comments

Comments
 (0)