Skip to content

Commit 5d1829a

Browse files
committed
Use explicit import and __all__ in bitcoin.net
Previously was exporting bitcoin.core.serialize namespace. [ yapified by gitreformat (github/ghtdak) on Mon Nov 30 21:11:11 2015 ]
1 parent 0806dce commit 5d1829a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

bitcoin/net.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
import socket
1616
from binascii import hexlify
1717

18-
from .core import PROTO_VERSION, CADDR_TIME_VERSION
19-
from .core.serialize import *
18+
from bitcoin.core.serialize import (Serializable,
19+
VarStringSerializer,
20+
ser_read,
21+
uint256VectorSerializer,)
2022

2123
PROTO_VERSION = 60002
2224
CADDR_TIME_VERSION = 31402
@@ -178,3 +180,12 @@ def stream_serialize(self, f):
178180
def __repr__(self):
179181
return "CAlert(vchMsg.sz %d, vchSig.sz %d)" % (len(self.vchMsg),
180182
len(self.vchSig))
183+
184+
185+
__all__ = ('PROTO_VERSION',
186+
'CADDR_TIME_VERSION',
187+
'CAddress',
188+
'CInv',
189+
'CBlockLocator',
190+
'CUnsignedAlert',
191+
'CAlert',)

0 commit comments

Comments
 (0)