Skip to content

Commit b9d5bd9

Browse files
committed
mempool.py: add a few type hints
1 parent 6130956 commit b9d5bd9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/electrumx/server/mempool.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@
2929

3030
@attr.s(slots=True)
3131
class MemPoolTx:
32-
prevouts = attr.ib() # type: Sequence[Tuple[bytes, int]]
32+
prevouts = attr.ib() # type: Sequence[Tuple[bytes, int]] # (txid, txout_idx)
3333
# A pair is a (hashX, value) tuple
34-
in_pairs = attr.ib() # type: Optional[Sequence[Tuple[bytes, int]]]
35-
out_pairs = attr.ib() # type: Sequence[Tuple[bytes, int]]
36-
fee = attr.ib() # type: int
37-
size = attr.ib() # type: int
34+
in_pairs = attr.ib() # type: Optional[Sequence[Tuple[bytes, int]]] # (hashX, value_in_sats)
35+
out_pairs = attr.ib() # type: Sequence[Tuple[bytes, int]] # (hashX, value_in_sats)
36+
fee = attr.ib() # type: int # in sats
37+
size = attr.ib() # type: int # in vbytes
3838

3939

4040
@attr.s(slots=True)
4141
class MemPoolTxSummary:
42-
hash = attr.ib()
43-
fee = attr.ib()
44-
has_unconfirmed_inputs = attr.ib()
42+
hash = attr.ib() # type: bytes
43+
fee = attr.ib() # type: int # in sats
44+
has_unconfirmed_inputs = attr.ib() # type: bool
4545

4646

4747
class DBSyncError(Exception):

0 commit comments

Comments
 (0)