diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f5f9635f..b382dddcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,7 @@ jobs: - name: Run pycodestyle run: | pycodestyle \ + --exclude=src/electrumx/lib/zcash \ --max-line-length=140 \ src diff --git a/src/electrumx/lib/tx.py b/src/electrumx/lib/tx.py index d0b472f37..ed92afb24 100644 --- a/src/electrumx/lib/tx.py +++ b/src/electrumx/lib/tx.py @@ -586,10 +586,10 @@ def read_tx(self): self.cursor += 96 * nSpendsSapling # vSpendsSapling nOutputsSapling = self._read_varint() self.cursor += 756 * nOutputsSapling # vOutputsSapling - hasSapling = not(nSpendsSapling == 0 and nOutputsSapling == 0) + hasSapling = not (nSpendsSapling == 0 and nOutputsSapling == 0) if (hasSapling): self.cursor += 8 # valueBalanceSapling - if not(nSpendsSapling == 0): + if not (nSpendsSapling == 0): self.cursor += 32 # anchorSapling self.cursor += 192 * nSpendsSapling # vSpendProofsSapling self.cursor += 64 * nSpendsSapling # vSpendAuthSigsSapling @@ -606,7 +606,7 @@ def read_tx(self): self.cursor += 32 # anchorOrchard sizeProofsOrchard = self._read_varint() self.cursor += sizeProofsOrchard # proofsOrchard - self.cursor += 64 * nActionsOrchard # vSpendAuthSigsOrchard + self.cursor += 64 * nActionsOrchard # vSpendAuthSigsOrchard self.cursor += 64 # bindingSigOrchard if is_zip229_v6: nActionsIronwood = self._read_varint() @@ -662,6 +662,7 @@ def _zcash_txid_canonical(txin, *, expected_version): ) from e return bytes(reversed(hex_str_to_bytes(tx.hash))) + @dataclass(kw_only=True, slots=True) class TxPIVX(Tx): '''Class representing a PIVX transaction.''' diff --git a/tests/test_blocks.py b/tests/test_blocks.py index 561324b13..0459380d5 100644 --- a/tests/test_blocks.py +++ b/tests/test_blocks.py @@ -54,6 +54,11 @@ def _does_coin_require_testcase(coin: Coin) -> bool: coins.Sibcoin, coins.CanadaeCoin, coins.Auroracoin, + coins.Clam, + coins.Diabase, + coins.Pepecoin, + coins.Riecoin, + coins.Verus, ]: return False return True