Surviving mutants

Generated by scripts/mutation_survivors.py from the cosmic-ray session databases. One row per surviving mutant: the suite ran that mutated line and no assertion failed.

A survivor is not automatically a bug — see the equivalent-mutant classes catalogued in docs/how-to/mutation-testing.md (type annotations, error-message f-strings, interpreter-detail rewrites). Triage means deciding, per row, whether the mutated behaviour is genuinely indistinguishable or whether nothing tests it.

1030 surviving mutants across 9 modules, of which 385 are marked annot — a type annotation rewritten by a BitOr-family operator, which cannot change behaviour. Start with the unmarked rows.

src/pyrxd/network/_guards.py — 15 survivors (11 annot)

Line

Definition

Operator

Original

Mutant

90

hex_str

ReplaceBinaryOperator_BitOr_Add

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int + None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_BitAnd

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int & None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_BitXor

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int ^ None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_Div

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int / None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_FloorDiv

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int // None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_LShift

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int << None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_Mod

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int % None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_Mul

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int * None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_Pow

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int ** None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_RShift

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int >> None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_BitOr_Sub

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, *, nbytes: int - None = None) -> str:

annot

90

hex_str

ReplaceBinaryOperator_Mul_Div

def hex_str(value: Any, *, nbytes: int | None = None) -> str:

def hex_str(value: Any, /, nbytes: int | None = None) -> str:

99

hex_str

ReplaceComparisonOperator_NotEq_IsNot

if nbytes is not None and len(value) != nbytes * 2:

if nbytes is not None and len(value) is not nbytes * 2:

101

hex_str

NumberReplacer

if len(value) % 2 or not value:

if len(value) % 1 or not value:

101

hex_str

ReplaceBinaryOperator_Mod_BitAnd

if len(value) % 2 or not value:

if len(value) & 2 or not value:

src/pyrxd/network/bitcoin.py — 448 survivors (77 annot)

Line

Definition

Operator

Original

Mutant

43

(module level)

NumberReplacer

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1023  # 10 MB

43

(module level)

NumberReplacer

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 9 * 1024 * 1024  # 10 MB

43

(module level)

NumberReplacer

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1023 * 1024  # 10 MB

43

(module level)

ReplaceBinaryOperator_Mul_Add

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 + 1024  # 10 MB

43

(module level)

ReplaceBinaryOperator_Mul_Add

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 + 1024 * 1024  # 10 MB

43

(module level)

ReplaceBinaryOperator_Mul_BitOr

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 | 1024 * 1024  # 10 MB

43

(module level)

ReplaceBinaryOperator_Mul_BitOr

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 | 1024  # 10 MB

43

(module level)

ReplaceBinaryOperator_Mul_BitXor

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 ^ 1024 * 1024  # 10 MB

43

(module level)

ReplaceBinaryOperator_Mul_BitXor

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 ^ 1024  # 10 MB

43

(module level)

ReplaceBinaryOperator_Mul_Mod

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 % 1024 * 1024  # 10 MB

43

(module level)

ReplaceBinaryOperator_Mul_Sub

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 - 1024  # 10 MB

52

BtcDataSource

RemoveDecorator

``

``

56

BtcDataSource

RemoveDecorator

``

``

60

BtcDataSource

RemoveDecorator

``

``

64

BtcDataSource

RemoveDecorator

``

``

68

BtcDataSource

RemoveDecorator

``

``

69

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 7) -> RawTx:

69

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 5) -> RawTx:

72

BtcDataSource

RemoveDecorator

``

``

76

BtcDataSource

RemoveDecorator

``

``

83

BtcDataSource

RemoveDecorator

``

``

87

BtcDataSource

RemoveDecorator

``

``

128

_assert_tx_identity

NumberReplacer

f"tx response does not identify the requested transaction {str(txid)[:16]}… "

f"tx response does not identify the requested transaction {str(txid)[: 17]}… "

128

_assert_tx_identity

NumberReplacer

f"tx response does not identify the requested transaction {str(txid)[:16]}… "

f"tx response does not identify the requested transaction {str(txid)[: 15]}… "

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_Add

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int + None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_BitAnd

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int & None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_BitXor

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int ^ None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_Div

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int / None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_FloorDiv

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int // None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_LShift

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int << None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_Mod

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int % None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_Mul

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int * None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_Pow

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int ** None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_RShift

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int >> None:

annot

146

_esplora_status_height

ReplaceBinaryOperator_BitOr_Sub

def _esplora_status_height(status: Any) -> int | None:

def _esplora_status_height(status: Any) -> int - None:

annot

187

_check_response_size

ReplaceComparisonOperator_Gt_GtE

if len(body) > _MAX_RESPONSE_BYTES:

if len(body) >= _MAX_RESPONSE_BYTES:

195

_get_json

ReplaceFalseWithTrue

async with session.get(url, allow_redirects=False) as resp:

async with session.get(url, allow_redirects=True) as resp:

197

_get_json

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_Add

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int + None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_BitAnd

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int & None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_BitXor

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int ^ None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_Div

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int / None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_FloorDiv

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int // None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_LShift

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int << None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_Mod

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int % None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_Mul

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int * None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_Pow

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int ** None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_RShift

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int >> None = None) -> bytes:

annot

210

_get_hex_bytes

ReplaceBinaryOperator_BitOr_Sub

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int | None = None) -> bytes:

async def _get_hex_bytes(session: aiohttp.ClientSession, url: str, expected_len: int - None = None) -> bytes:

annot

213

_get_hex_bytes

ReplaceFalseWithTrue

async with session.get(url, allow_redirects=False) as resp:

async with session.get(url, allow_redirects=True) as resp:

215

_get_hex_bytes

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

221

_get_hex_bytes

ReplaceComparisonOperator_NotEq_IsNot

if expected_len is not None and len(result) != expected_len:

if expected_len is not None and len(result) is not expected_len:

221

_get_hex_bytes

ReplaceComparisonOperator_NotEq_Lt

if expected_len is not None and len(result) != expected_len:

if expected_len is not None and len(result) < expected_len:

245

_get_session

ReplaceOrWithAnd

if self._session is None or self._session.closed:

if self._session is None and self._session.closed:

258

_url

ZeroIterationForLoop

for part in parts:

for part in []:

266

get_tip_height

ReplaceFalseWithTrue

async with session.get(url, allow_redirects=False) as resp:

async with session.get(url, allow_redirects=True) as resp:

268

get_tip_height

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

268

get_tip_height

ReplaceComparisonOperator_NotEq_Lt

if resp.status != 200:

if resp.status < 200:

278

get_block_hash

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

278

get_block_hash

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

283

get_block_hash

ReplaceFalseWithTrue

async with session.get(url, allow_redirects=False) as resp:

async with session.get(url, allow_redirects=True) as resp:

285

get_block_hash

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

285

get_block_hash

ReplaceComparisonOperator_NotEq_Lt

if resp.status != 200:

if resp.status < 200:

296

get_block_header_hex

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

296

get_block_header_hex

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

305

get_header_chain

AddNot

if not isinstance(start_height, BlockHeight):

if not not isinstance(start_height, BlockHeight):

305

get_header_chain

ReplaceUnaryOperator_Delete_Not

if not isinstance(start_height, BlockHeight):

if  isinstance(start_height, BlockHeight):

307

get_header_chain

ReplaceComparisonOperator_LtE_Eq

if count <= 0:

if count == 0:

311

get_header_chain

ReplaceBinaryOperator_Add_BitAnd

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) & i)) for i in range(count)]

311

get_header_chain

ReplaceBinaryOperator_Add_BitOr

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) | i)) for i in range(count)]

311

get_header_chain

ReplaceBinaryOperator_Add_BitXor

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) ^ i)) for i in range(count)]

311

get_header_chain

ReplaceBinaryOperator_Add_LShift

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) << i)) for i in range(count)]

311

get_header_chain

ReplaceBinaryOperator_Add_Mul

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) * i)) for i in range(count)]

311

get_header_chain

ReplaceBinaryOperator_Add_Pow

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) ** i)) for i in range(count)]

311

get_header_chain

ReplaceBinaryOperator_Add_RShift

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) >> i)) for i in range(count)]

311

get_header_chain

ReplaceBinaryOperator_Add_Sub

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) - i)) for i in range(count)]

319

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 5) -> RawTx:

319

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 7) -> RawTx:

320

get_raw_tx

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

320

get_raw_tx

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

331

get_raw_tx

ReplaceComparisonOperator_Gt_NotEq

if min_confirmations > 0:

if min_confirmations != 0:

338

get_raw_tx

NumberReplacer

if block_height < 1 or block_height > int(tip):

if block_height < 2 or block_height > int(tip):

338

get_raw_tx

ReplaceComparisonOperator_Gt_GtE

if block_height < 1 or block_height > int(tip):

if block_height < 1 or block_height >= int(tip):

338

get_raw_tx

ReplaceComparisonOperator_Lt_LtE

if block_height < 1 or block_height > int(tip):

if block_height <= 1 or block_height > int(tip):

343

get_raw_tx

ReplaceBinaryOperator_Sub_Mod

confs = int(tip) - block_height + 1

confs = int(tip) % block_height + 1

350

get_raw_tx

ReplaceFalseWithTrue

async with session.get(hex_url, allow_redirects=False) as resp:

async with session.get(hex_url, allow_redirects=True) as resp:

352

get_raw_tx

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

352

get_raw_tx

ReplaceComparisonOperator_NotEq_Lt

if resp.status != 200:

if resp.status < 200:

364

get_tx_block_height

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

364

get_tx_block_height

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

371

get_tx_block_height

NumberReplacer

raise NetworkError(f"tx {str(txid)[:16]}… is unconfirmed")

raise NetworkError(f"tx {str(txid)[: 15]}… is unconfirmed")

371

get_tx_block_height

NumberReplacer

raise NetworkError(f"tx {str(txid)[:16]}… is unconfirmed")

raise NetworkError(f"tx {str(txid)[: 17]}… is unconfirmed")

378

get_tx_output_script_type

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

378

get_tx_output_script_type

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

405

get_merkle_proof

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

405

get_merkle_proof

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

407

get_merkle_proof

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

407

get_merkle_proof

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

426

_get_session

ReplaceOrWithAnd

if self._session is None or self._session.closed:

if self._session is None and self._session.closed:

437

_url

ZeroIterationForLoop

for part in parts:

for part in []:

445

get_tip_height

ReplaceFalseWithTrue

async with session.get(url, allow_redirects=False) as resp:

async with session.get(url, allow_redirects=True) as resp:

447

get_tip_height

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

447

get_tip_height

ReplaceComparisonOperator_NotEq_Lt

if resp.status != 200:

if resp.status < 200:

457

get_block_hash

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

457

get_block_hash

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

462

get_block_hash

ReplaceFalseWithTrue

async with session.get(url, allow_redirects=False) as resp:

async with session.get(url, allow_redirects=True) as resp:

464

get_block_hash

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

464

get_block_hash

ReplaceComparisonOperator_NotEq_Lt

if resp.status != 200:

if resp.status < 200:

475

get_block_header_hex

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

475

get_block_header_hex

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

483

get_header_chain

AddNot

if not isinstance(start_height, BlockHeight):

if not not isinstance(start_height, BlockHeight):

483

get_header_chain

ReplaceUnaryOperator_Delete_Not

if not isinstance(start_height, BlockHeight):

if  isinstance(start_height, BlockHeight):

485

get_header_chain

ReplaceComparisonOperator_LtE_Eq

if count <= 0:

if count == 0:

487

get_header_chain

ReplaceBinaryOperator_Add_BitAnd

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) & i)) for i in range(count)]

487

get_header_chain

ReplaceBinaryOperator_Add_BitOr

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) | i)) for i in range(count)]

487

get_header_chain

ReplaceBinaryOperator_Add_BitXor

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) ^ i)) for i in range(count)]

487

get_header_chain

ReplaceBinaryOperator_Add_LShift

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) << i)) for i in range(count)]

487

get_header_chain

ReplaceBinaryOperator_Add_Mul

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) * i)) for i in range(count)]

487

get_header_chain

ReplaceBinaryOperator_Add_Pow

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) ** i)) for i in range(count)]

487

get_header_chain

ReplaceBinaryOperator_Add_RShift

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) >> i)) for i in range(count)]

487

get_header_chain

ReplaceBinaryOperator_Add_Sub

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) - i)) for i in range(count)]

488

get_header_chain

ReplaceTrueWithFalse

results = await asyncio.gather(*tasks, return_exceptions=True)

results = await asyncio.gather(*tasks, return_exceptions=False)

496

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 7) -> RawTx:

496

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 5) -> RawTx:

497

get_raw_tx

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

497

get_raw_tx

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

505

get_raw_tx

NumberReplacer

raise InsufficientConfirmationsError(have=0, required=min_confirmations)

raise InsufficientConfirmationsError(have= -1, required=min_confirmations)

505

get_raw_tx

NumberReplacer

raise InsufficientConfirmationsError(have=0, required=min_confirmations)

raise InsufficientConfirmationsError(have= 1, required=min_confirmations)

507

get_raw_tx

ReplaceComparisonOperator_Gt_NotEq

if min_confirmations > 0:

if min_confirmations != 0:

510

get_raw_tx

NumberReplacer

if block_height < 1 or block_height > int(tip):

if block_height < 2 or block_height > int(tip):

510

get_raw_tx

ReplaceComparisonOperator_Gt_Eq

if block_height < 1 or block_height > int(tip):

if block_height < 1 or block_height == int(tip):

510

get_raw_tx

ReplaceComparisonOperator_Gt_GtE

if block_height < 1 or block_height > int(tip):

if block_height < 1 or block_height >= int(tip):

510

get_raw_tx

ReplaceComparisonOperator_Gt_Is

if block_height < 1 or block_height > int(tip):

if block_height < 1 or block_height is int(tip):

510

get_raw_tx

ReplaceComparisonOperator_Lt_LtE

if block_height < 1 or block_height > int(tip):

if block_height <= 1 or block_height > int(tip):

515

get_raw_tx

NumberReplacer

confs = int(tip) - block_height + 1

confs = int(tip) - block_height + 0

515

get_raw_tx

NumberReplacer

confs = int(tip) - block_height + 1

confs = int(tip) - block_height + 2

515

get_raw_tx

ReplaceBinaryOperator_Add_BitOr

confs = int(tip) - block_height + 1

confs = int(tip) - block_height | 1

515

get_raw_tx

ReplaceBinaryOperator_Add_BitXor

confs = int(tip) - block_height + 1

confs = int(tip) - block_height ^ 1

515

get_raw_tx

ReplaceBinaryOperator_Add_Div

confs = int(tip) - block_height + 1

confs = int(tip) - block_height / 1

515

get_raw_tx

ReplaceBinaryOperator_Add_FloorDiv

confs = int(tip) - block_height + 1

confs = int(tip) - block_height // 1

515

get_raw_tx

ReplaceBinaryOperator_Add_LShift

confs = int(tip) - block_height + 1

confs = int(tip) - block_height << 1

515

get_raw_tx

ReplaceBinaryOperator_Add_Mod

confs = int(tip) - block_height + 1

confs = int(tip) - block_height % 1

515

get_raw_tx

ReplaceBinaryOperator_Add_Mul

confs = int(tip) - block_height + 1

confs = int(tip) - block_height * 1

515

get_raw_tx

ReplaceBinaryOperator_Add_Pow

confs = int(tip) - block_height + 1

confs = int(tip) - block_height ** 1

515

get_raw_tx

ReplaceBinaryOperator_Add_RShift

confs = int(tip) - block_height + 1

confs = int(tip) - block_height >> 1

515

get_raw_tx

ReplaceBinaryOperator_Add_Sub

confs = int(tip) - block_height + 1

confs = int(tip) - block_height - 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_Add

confs = int(tip) - block_height + 1

confs = int(tip) + block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_BitAnd

confs = int(tip) - block_height + 1

confs = int(tip) & block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_BitOr

confs = int(tip) - block_height + 1

confs = int(tip) | block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_BitXor

confs = int(tip) - block_height + 1

confs = int(tip) ^ block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_Div

confs = int(tip) - block_height + 1

confs = int(tip) / block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_FloorDiv

confs = int(tip) - block_height + 1

confs = int(tip) // block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_LShift

confs = int(tip) - block_height + 1

confs = int(tip) << block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_Mod

confs = int(tip) - block_height + 1

confs = int(tip) % block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_Mul

confs = int(tip) - block_height + 1

confs = int(tip) * block_height + 1

515

get_raw_tx

ReplaceBinaryOperator_Sub_Pow

confs = int(tip) - block_height + 1

confs = int(tip) ** block_height + 1

516

get_raw_tx

ReplaceComparisonOperator_Lt_Eq

if confs < min_confirmations:

if confs == min_confirmations:

516

get_raw_tx

ReplaceComparisonOperator_Lt_Is

if confs < min_confirmations:

if confs is min_confirmations:

516

get_raw_tx

ReplaceComparisonOperator_Lt_LtE

if confs < min_confirmations:

if confs <= min_confirmations:

521

get_raw_tx

ReplaceFalseWithTrue

async with session.get(hex_url, allow_redirects=False) as resp:

async with session.get(hex_url, allow_redirects=True) as resp:

523

get_raw_tx

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

523

get_raw_tx

ReplaceComparisonOperator_NotEq_Lt

if resp.status != 200:

if resp.status < 200:

527

get_raw_tx

ExceptionReplacer

except (ValueError, UnicodeDecodeError):

except (CosmicRayTestingException, UnicodeDecodeError):

527

get_raw_tx

ExceptionReplacer

except (ValueError, UnicodeDecodeError):

except (ValueError, CosmicRayTestingException):

531

get_raw_tx

ExceptionReplacer

except aiohttp.ClientError as exc:

except aiohttpCosmicRayTestingExceptionClientError as exc:

535

get_tx_block_height

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

535

get_tx_block_height

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

542

get_tx_block_height

NumberReplacer

raise NetworkError(f"tx {str(txid)[:16]}… is unconfirmed")

raise NetworkError(f"tx {str(txid)[: 17]}… is unconfirmed")

542

get_tx_block_height

NumberReplacer

raise NetworkError(f"tx {str(txid)[:16]}… is unconfirmed")

raise NetworkError(f"tx {str(txid)[: 15]}… is unconfirmed")

549

get_tx_output_script_type

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

549

get_tx_output_script_type

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

571

get_tx_output_script_type

ExceptionReplacer

except (KeyError, IndexError, TypeError):

except (KeyError, CosmicRayTestingException, TypeError):

571

get_tx_output_script_type

ExceptionReplacer

except (KeyError, IndexError, TypeError):

except (CosmicRayTestingException, IndexError, TypeError):

571

get_tx_output_script_type

ExceptionReplacer

except (KeyError, IndexError, TypeError):

except (KeyError, IndexError, CosmicRayTestingException):

575

get_merkle_proof

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

575

get_merkle_proof

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

577

get_merkle_proof

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

577

get_merkle_proof

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

609

__init__

NumberReplacer

self._id_counter = 0

self._id_counter = -1

609

__init__

NumberReplacer

self._id_counter = 0

self._id_counter = 1

612

_get_session

AddNot

if self._session is None or self._session.closed:

if not self._session is None or self._session.closed:

612

_get_session

ReplaceComparisonOperator_Is_IsNot

if self._session is None or self._session.closed:

if self._session is not None or self._session.closed:

612

_get_session

ReplaceOrWithAnd

if self._session is None or self._session.closed:

if self._session is None and self._session.closed:

628

_rpc

NumberReplacer

self._id_counter += 1

self._id_counter += 2

628

_rpc

NumberReplacer

self._id_counter += 1

self._id_counter += 0

636

_rpc

ReplaceFalseWithTrue

async with session.post(self._url, json=payload, allow_redirects=False) as resp:

async with session.post(self._url, json=payload, allow_redirects=True) as resp:

665

get_block_hash

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

665

get_block_hash

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

676

get_block_header_hex

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

676

get_block_header_hex

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

680

get_block_header_hex

ReplaceFalseWithTrue

result = await self._rpc("getblockheader", [block_hash.hex(), False])

result = await self._rpc("getblockheader", [block_hash.hex(), True])

687

get_block_header_hex

ReplaceComparisonOperator_NotEq_Lt

if len(header) != 80:

if len(header) < 80:

692

get_header_chain

AddNot

if not isinstance(start_height, BlockHeight):

if not not isinstance(start_height, BlockHeight):

692

get_header_chain

ReplaceUnaryOperator_Delete_Not

if not isinstance(start_height, BlockHeight):

if  isinstance(start_height, BlockHeight):

694

get_header_chain

ReplaceComparisonOperator_LtE_Eq

if count <= 0:

if count == 0:

696

get_header_chain

ReplaceBinaryOperator_Add_BitAnd

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) & i)) for i in range(count)]

696

get_header_chain

ReplaceBinaryOperator_Add_BitOr

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) | i)) for i in range(count)]

696

get_header_chain

ReplaceBinaryOperator_Add_BitXor

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) ^ i)) for i in range(count)]

696

get_header_chain

ReplaceBinaryOperator_Add_LShift

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) << i)) for i in range(count)]

696

get_header_chain

ReplaceBinaryOperator_Add_Mul

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) * i)) for i in range(count)]

696

get_header_chain

ReplaceBinaryOperator_Add_Pow

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) ** i)) for i in range(count)]

696

get_header_chain

ReplaceBinaryOperator_Add_RShift

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) >> i)) for i in range(count)]

696

get_header_chain

ReplaceBinaryOperator_Add_Sub

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) + i)) for i in range(count)]

tasks = [self.get_block_header_hex(BlockHeight(int(start_height) - i)) for i in range(count)]

697

get_header_chain

ReplaceTrueWithFalse

results = await asyncio.gather(*tasks, return_exceptions=True)

results = await asyncio.gather(*tasks, return_exceptions=False)

705

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 5) -> RawTx:

705

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 7) -> RawTx:

706

get_raw_tx

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

706

get_raw_tx

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

709

get_raw_tx

ReplaceTrueWithFalse

data = await self._rpc("getrawtransaction", [str(txid), True])

data = await self._rpc("getrawtransaction", [str(txid), False])

718

get_raw_tx

NumberReplacer

confs = nonneg_int(data.get("confirmations", 0))

confs = nonneg_int(data.get("confirmations", -1))

718

get_raw_tx

NumberReplacer

confs = nonneg_int(data.get("confirmations", 0))

confs = nonneg_int(data.get("confirmations", 1))

721

get_raw_tx

ReplaceComparisonOperator_Lt_LtE

if confs < min_confirmations:

if confs <= min_confirmations:

734

get_tx_block_height

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

734

get_tx_block_height

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

736

get_tx_block_height

ReplaceTrueWithFalse

data = await self._rpc("getrawtransaction", [str(txid), True])

data = await self._rpc("getrawtransaction", [str(txid), False])

741

get_tx_block_height

NumberReplacer

raise NetworkError(f"tx {str(txid)[:16]}… is unconfirmed or blockheight missing")

raise NetworkError(f"tx {str(txid)[: 17]}… is unconfirmed or blockheight missing")

741

get_tx_block_height

NumberReplacer

raise NetworkError(f"tx {str(txid)[:16]}… is unconfirmed or blockheight missing")

raise NetworkError(f"tx {str(txid)[: 15]}… is unconfirmed or blockheight missing")

744

get_tx_block_height

ExceptionReplacer

except (ValueError, ValidationError):

except (ValueError, CosmicRayTestingException):

744

get_tx_block_height

ExceptionReplacer

except (ValueError, ValidationError):

except (CosmicRayTestingException, ValidationError):

748

get_tx_output_script_type

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

748

get_tx_output_script_type

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

750

get_tx_output_script_type

ReplaceTrueWithFalse

data = await self._rpc("getrawtransaction", [str(txid), True])

data = await self._rpc("getrawtransaction", [str(txid), False])

795

_verify_raw_matches_txid

ExceptionReplacer

except Exception as exc:

except CosmicRayTestingException as exc:

797

_verify_raw_matches_txid

ReplaceComparisonOperator_NotEq_Gt

if derived.lower() != str(txid).lower():

if derived.lower() > str(txid).lower():

797

_verify_raw_matches_txid

ReplaceComparisonOperator_NotEq_Is

if derived.lower() != str(txid).lower():

if derived.lower() is str(txid).lower():

797

_verify_raw_matches_txid

ReplaceComparisonOperator_NotEq_Lt

if derived.lower() != str(txid).lower():

if derived.lower() < str(txid).lower():

798

_verify_raw_matches_txid

NumberReplacer

raise NetworkError(f"returned tx bytes do not match the requested txid {str(txid)[:16]}…; fail-closed")

raise NetworkError(f"returned tx bytes do not match the requested txid {str(txid)[: 17]}…; fail-closed")

798

_verify_raw_matches_txid

NumberReplacer

raise NetworkError(f"returned tx bytes do not match the requested txid {str(txid)[:16]}…; fail-closed")

raise NetworkError(f"returned tx bytes do not match the requested txid {str(txid)[: 15]}…; fail-closed")

816

__init__

NumberReplacer

def __init__(self, sources: list[BtcDataSource], quorum: int = 2) -> None:

def __init__(self, sources: list[BtcDataSource], quorum: int = 1) -> None:

816

__init__

NumberReplacer

def __init__(self, sources: list[BtcDataSource], quorum: int = 2) -> None:

def __init__(self, sources: list[BtcDataSource], quorum: int = 3) -> None:

824

close

ZeroIterationForLoop

for source in self._sources:

for source in []:

842

_require_quorum

ReplaceContinueWithBreak

continue

break

847

_require_quorum

ReplaceComparisonOperator_GtE_Eq

if len(group) >= self._quorum:

if len(group) == self._quorum:

847

_require_quorum

ReplaceComparisonOperator_GtE_Is

if len(group) >= self._quorum:

if len(group) is self._quorum:

848

_require_quorum

NumberReplacer

return group[0]

return group[ -1]

850

_require_quorum

NumberReplacer

successful = sum(1 for r in results if not isinstance(r, Exception))

successful = sum( 0 for r in results if not isinstance(r, Exception))

850

_require_quorum

NumberReplacer

successful = sum(1 for r in results if not isinstance(r, Exception))

successful = sum( 2 for r in results if not isinstance(r, Exception))

850

_require_quorum

ReplaceUnaryOperator_Delete_Not

successful = sum(1 for r in results if not isinstance(r, Exception))

successful = sum(1 for r in results if  isinstance(r, Exception))

861

get_block_hash

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

861

get_block_hash

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

868

get_block_header_hex

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

868

get_block_header_hex

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

875

get_header_chain

AddNot

if not isinstance(start_height, BlockHeight):

if not not isinstance(start_height, BlockHeight):

875

get_header_chain

ReplaceUnaryOperator_Delete_Not

if not isinstance(start_height, BlockHeight):

if  isinstance(start_height, BlockHeight):

886

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 7) -> RawTx:

886

get_raw_tx

NumberReplacer

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 6) -> RawTx:

async def get_raw_tx(self, txid: Txid, min_confirmations: int = 5) -> RawTx:

887

get_raw_tx

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

887

get_raw_tx

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

898

get_tx_block_height

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

898

get_tx_block_height

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

905

get_tx_output_script_type

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

905

get_tx_output_script_type

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

912

get_merkle_proof

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

912

get_merkle_proof

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

914

get_merkle_proof

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

914

get_merkle_proof

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

951

_MempoolHttpClient

NumberReplacer

DEFAULT_TIMEOUT_S: float = 30.0

DEFAULT_TIMEOUT_S: float = 31.0

951

_MempoolHttpClient

NumberReplacer

DEFAULT_TIMEOUT_S: float = 30.0

DEFAULT_TIMEOUT_S: float = 29.0

953

__init__

ReplaceBinaryOperator_BitOr_Add

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float + None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_BitAnd

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float & None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_BitXor

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float ^ None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_Div

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float / None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_FloorDiv

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float // None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_LShift

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float << None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_Mod

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float % None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_Mul

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float * None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_Pow

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float ** None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_RShift

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float >> None = None) -> None:

annot

953

__init__

ReplaceBinaryOperator_BitOr_Sub

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float | None = None) -> None:

def __init__(self, base_url: str = "https://mempool.space/api", *, timeout_s: float - None = None) -> None:

annot

964

close

ReplaceUnaryOperator_Delete_Not

if self._session and not self._session.closed:

if self._session and  self._session.closed:

977

tip_height

ReplaceFalseWithTrue

async with s.get(self.url("blocks/tip/height"), allow_redirects=False) as resp:

async with s.get(self.url("blocks/tip/height"), allow_redirects=True) as resp:

979

tip_height

ReplaceComparisonOperator_NotEq_Gt

if resp.status != 200:

if resp.status > 200:

979

tip_height

ReplaceComparisonOperator_NotEq_Lt

if resp.status != 200:

if resp.status < 200:

1025

__init__

ReplaceBinaryOperator_BitOr_Add

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient + None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_BitAnd

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient & None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_BitXor

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient ^ None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_Div

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient / None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_FloorDiv

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient // None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_LShift

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient << None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_Mod

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient % None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_Mul

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient * None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_Pow

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient ** None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_RShift

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient >> None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_BitOr_Sub

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient - None = None, *, base_url: str = "https://mempool.space/api"

annot

1025

__init__

ReplaceBinaryOperator_Mul_Div

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient | None = None, /, base_url: str = "https://mempool.space/api"

1032

broadcast

ReplaceComparisonOperator_Eq_LtE

if not isinstance(raw_tx, (bytes, bytearray)) or len(raw_tx) == 0:

if not isinstance(raw_tx, (bytes, bytearray)) or len(raw_tx) <= 0:

1037

broadcast

ReplaceFalseWithTrue

async with s.post(self._http.url("tx"), data=raw.hex(), allow_redirects=False) as resp:

async with s.post(self._http.url("tx"), data=raw.hex(), allow_redirects=True) as resp:

1039

broadcast

ReplaceComparisonOperator_Eq_LtE

if resp.status == 200:

if resp.status <= 200:

1079

__init__

ReplaceBinaryOperator_BitOr_Add

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient + None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_BitAnd

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient & None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_BitXor

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient ^ None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_Div

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient / None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_FloorDiv

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient // None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_LShift

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient << None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_Mod

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient % None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_Mul

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient * None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_Pow

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient ** None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_RShift

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient >> None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_BitOr_Sub

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient - None = None, *, base_url: str = "https://mempool.space/api"

annot

1079

__init__

ReplaceBinaryOperator_Mul_Div

self, client: _MempoolHttpClient | None = None, *, base_url: str = "https://mempool.space/api"

self, client: _MempoolHttpClient | None = None, /, base_url: str = "https://mempool.space/api"

1084

confirmations

AddNot

tx = txid if isinstance(txid, Txid) else Txid(txid)

tx = txid if not isinstance(txid, Txid) else Txid(txid)

1100

confirmations

NumberReplacer

if block_height < 1 or block_height > int(tip):

if block_height < 2 or block_height > int(tip):

1100

confirmations

ReplaceComparisonOperator_Gt_GtE

if block_height < 1 or block_height > int(tip):

if block_height < 1 or block_height >= int(tip):

1100

confirmations

ReplaceComparisonOperator_Lt_LtE

if block_height < 1 or block_height > int(tip):

if block_height <= 1 or block_height > int(tip):

1102

confirmations

NumberReplacer

f"inconsistent confirmation data for {str(tx)[:16]}…: block_height={block_height}, tip={int(tip)}; "

f"inconsistent confirmation data for {str(tx)[: 17]}…: block_height={block_height}, tip={int(tip)}; "

1102

confirmations

NumberReplacer

f"inconsistent confirmation data for {str(tx)[:16]}…: block_height={block_height}, tip={int(tip)}; "

f"inconsistent confirmation data for {str(tx)[: 15]}…: block_height={block_height}, tip={int(tip)}; "

1105

confirmations

ReplaceBinaryOperator_Sub_Mod

confs = int(tip) - block_height + 1

confs = int(tip) % block_height + 1

1106

confirmations

NumberReplacer

return confs if confs > 0 else 0

return confs if confs > 0 else -1

1106

confirmations

NumberReplacer

return confs if confs > 0 else 0

return confs if confs > -1 else 0

1106

confirmations

NumberReplacer

return confs if confs > 0 else 0

return confs if confs > 0 else 1

1106

confirmations

NumberReplacer

return confs if confs > 0 else 0

return confs if confs > 1 else 0

1106

confirmations

ReplaceComparisonOperator_Gt_GtE

return confs if confs > 0 else 0

return confs if confs >= 0 else 0

1106

confirmations

ReplaceComparisonOperator_Gt_NotEq

return confs if confs > 0 else 0

return confs if confs != 0 else 0

1108

read_output_amount_sats

ReplaceBinaryOperator_Mul_Div

async def read_output_amount_sats(self, txid: str, vout: int, *, min_confirmations: int) -> int:

async def read_output_amount_sats(self, txid: str, vout: int, /, min_confirmations: int) -> int:

1109

read_output_amount_sats

AddNot

tx = txid if isinstance(txid, Txid) else Txid(txid)

tx = txid if not isinstance(txid, Txid) else Txid(txid)

1111

read_output_amount_sats

ReplaceComparisonOperator_Lt_LtE

if confs < min_confirmations:

if confs <= min_confirmations:

1118

read_output_amount_sats

NumberReplacer

raise NetworkError(f"could not read output value for {str(tx)[:16]}…:{vout}") from exc

raise NetworkError(f"could not read output value for {str(tx)[: 17]}…:{vout}") from exc

1118

read_output_amount_sats

NumberReplacer

raise NetworkError(f"could not read output value for {str(tx)[:16]}…:{vout}") from exc

raise NetworkError(f"could not read output value for {str(tx)[: 15]}…:{vout}") from exc

1131

read_confirmed_unspent_output

AddNot

tx = txid if isinstance(txid, Txid) else Txid(txid)

tx = txid if not isinstance(txid, Txid) else Txid(txid)

1135

read_confirmed_unspent_output

NumberReplacer

if await self.confirmations(tx) < 1:

if await self.confirmations(tx) < 2:

1135

read_confirmed_unspent_output

ReplaceComparisonOperator_Lt_LtE

if await self.confirmations(tx) < 1:

if await self.confirmations(tx) <= 1:

1136

read_confirmed_unspent_output

NumberReplacer

raise NetworkError(f"output {str(tx)[:16]}…:{index} is unconfirmed or unknown; fail-closed")

raise NetworkError(f"output {str(tx)[: 15]}…:{index} is unconfirmed or unknown; fail-closed")

1136

read_confirmed_unspent_output

NumberReplacer

raise NetworkError(f"output {str(tx)[:16]}…:{index} is unconfirmed or unknown; fail-closed")

raise NetworkError(f"output {str(tx)[: 17]}…:{index} is unconfirmed or unknown; fail-closed")

1144

read_confirmed_unspent_output

NumberReplacer

raise NetworkError(f"could not read output {str(tx)[:16]}…:{index}; fail-closed") from exc

raise NetworkError(f"could not read output {str(tx)[: 15]}…:{index}; fail-closed") from exc

1144

read_confirmed_unspent_output

NumberReplacer

raise NetworkError(f"could not read output {str(tx)[:16]}…:{index}; fail-closed") from exc

raise NetworkError(f"could not read output {str(tx)[: 17]}…:{index}; fail-closed") from exc

1145

read_confirmed_unspent_output

NumberReplacer

if not spk or value < 0:

if not spk or value < 1:

1145

read_confirmed_unspent_output

NumberReplacer

if not spk or value < 0:

if not spk or value < -1:

1145

read_confirmed_unspent_output

ReplaceComparisonOperator_Lt_Eq

if not spk or value < 0:

if not spk or value == 0:

1145

read_confirmed_unspent_output

ReplaceComparisonOperator_Lt_LtE

if not spk or value < 0:

if not spk or value <= 0:

1145

read_confirmed_unspent_output

ReplaceOrWithAnd

if not spk or value < 0:

if not spk and value < 0:

1146

read_confirmed_unspent_output

NumberReplacer

raise NetworkError(f"output {str(tx)[:16]}…:{index} has an empty scriptPubKey or negative value")

raise NetworkError(f"output {str(tx)[: 17]}…:{index} has an empty scriptPubKey or negative value")

1146

read_confirmed_unspent_output

NumberReplacer

raise NetworkError(f"output {str(tx)[:16]}…:{index} has an empty scriptPubKey or negative value")

raise NetworkError(f"output {str(tx)[: 15]}…:{index} has an empty scriptPubKey or negative value")

1155

read_confirmed_unspent_output

AddNot

if not isinstance(spent_flag, bool):

if not not isinstance(spent_flag, bool):

1155

read_confirmed_unspent_output

ReplaceUnaryOperator_Delete_Not

if not isinstance(spent_flag, bool):

if  isinstance(spent_flag, bool):

1157

read_confirmed_unspent_output

NumberReplacer

f"output {str(tx)[:16]}…:{index} has an uninterpretable 'spent' field "

f"output {str(tx)[: 15]}…:{index} has an uninterpretable 'spent' field "

1157

read_confirmed_unspent_output

NumberReplacer

f"output {str(tx)[:16]}…:{index} has an uninterpretable 'spent' field "

f"output {str(tx)[: 17]}…:{index} has an uninterpretable 'spent' field "

1160

read_confirmed_unspent_output

NumberReplacer

raise NetworkError(f"output {str(tx)[:16]}…:{index} is already SPENT; fail-closed")

raise NetworkError(f"output {str(tx)[: 15]}…:{index} is already SPENT; fail-closed")

1160

read_confirmed_unspent_output

NumberReplacer

raise NetworkError(f"output {str(tx)[:16]}…:{index} is already SPENT; fail-closed")

raise NetworkError(f"output {str(tx)[: 17]}…:{index} is already SPENT; fail-closed")

1193

list_address_utxos

ReplaceFalseWithTrue

"confirmed": require_bool(st.get("confirmed", False)),

"confirmed": require_bool(st.get("confirmed", True)),

1205

endpoint_host

ReplaceBinaryOperator_BitOr_Add

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str + None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_BitAnd

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str & None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_BitXor

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str ^ None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_Div

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str / None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_FloorDiv

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str // None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_LShift

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str << None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_Mod

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str % None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_Mul

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str * None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_Pow

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str ** None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_RShift

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str >> None:

annot

1205

endpoint_host

ReplaceBinaryOperator_BitOr_Sub

def endpoint_host(url: str) -> str | None:

def endpoint_host(url: str) -> str - None:

annot

1210

endpoint_host

ReplaceBinaryOperator_Add_BitAnd

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" & url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_BitOr

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" | url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_BitXor

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" ^ url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_Div

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" / url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_FloorDiv

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" // url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_LShift

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" << url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_Mod

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" % url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_Mul

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" * url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_Pow

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" ** url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_RShift

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" >> url.strip())

1210

endpoint_host

ReplaceBinaryOperator_Add_Sub

parsed = urlparse(url if "://" in url else "//" + url.strip())

parsed = urlparse(url if "://" in url else "//" - url.strip())

1227

count_distinct_hosts

ReplaceBinaryOperator_Add_BitOr

return len(hosts) + opaque

return len(hosts) | opaque

1227

count_distinct_hosts

ReplaceBinaryOperator_Add_BitXor

return len(hosts) + opaque

return len(hosts) ^ opaque

1250

_verbose_tx

AddNot

tx = str(txid if isinstance(txid, Txid) else Txid(txid))

tx = str(txid if not isinstance(txid, Txid) else Txid(txid))

1251

_verbose_tx

ReplaceTrueWithFalse

data = await self._rpc("getrawtransaction", [tx, True])

data = await self._rpc("getrawtransaction", [tx, False])

1271

confirmations

NumberReplacer

return confs if confs > 0 else 0

return confs if confs > -1 else 0

1271

confirmations

NumberReplacer

return confs if confs > 0 else 0

return confs if confs > 1 else 0

1271

confirmations

ReplaceComparisonOperator_Gt_GtE

return confs if confs > 0 else 0

return confs if confs >= 0 else 0

1288

_btc_to_sats

NumberReplacer

if sats < 0:

if sats < -1:

1288

_btc_to_sats

NumberReplacer

if sats < 0:

if sats < 1:

1288

_btc_to_sats

ReplaceComparisonOperator_Lt_LtE

if sats < 0:

if sats <= 0:

1292

read_output_amount_sats

ReplaceBinaryOperator_Mul_Div

async def read_output_amount_sats(self, txid: str, vout: int, *, min_confirmations: int) -> int:

async def read_output_amount_sats(self, txid: str, vout: int, /, min_confirmations: int) -> int:

1294

read_output_amount_sats

ReplaceComparisonOperator_Lt_LtE

if confs < min_confirmations:

if confs <= min_confirmations:

1300

read_output_amount_sats

NumberReplacer

raise NetworkError(f"could not read output value for {str(txid)[:16]}…:{vout}") from exc

raise NetworkError(f"could not read output value for {str(txid)[: 17]}…:{vout}") from exc

1300

read_output_amount_sats

NumberReplacer

raise NetworkError(f"could not read output value for {str(txid)[:16]}…:{vout}") from exc

raise NetworkError(f"could not read output value for {str(txid)[: 15]}…:{vout}") from exc

1312

read_confirmed_unspent_output

AddNot

tx = str(txid if isinstance(txid, Txid) else Txid(txid))

tx = str(txid if not isinstance(txid, Txid) else Txid(txid))

1316

read_confirmed_unspent_output

NumberReplacer

f"gettxout for {tx[:16]}…:{vout} returned null the output is spent, unconfirmed, or "

f"gettxout for {tx[: 17]}…:{vout} returned null the output is spent, unconfirmed, or "

1316

read_confirmed_unspent_output

NumberReplacer

f"gettxout for {tx[:16]}…:{vout} returned null the output is spent, unconfirmed, or "

f"gettxout for {tx[: 15]}…:{vout} returned null the output is spent, unconfirmed, or "

1320

read_confirmed_unspent_output

ReplaceOrWithAnd

if not isinstance(spk_hex, str) or not spk_hex:

if not isinstance(spk_hex, str) and not spk_hex:

1324

read_confirmed_unspent_output

ExceptionReplacer

except ValueError as exc:

except CosmicRayTestingException as exc:

1368

__init__

NumberReplacer

def __init__(self, readers: list, *, quorum: int = 2, dust_cap_sats: int = 10_000) -> None:

def __init__(self, readers: list, *, quorum: int = 1, dust_cap_sats: int = 10_000) -> None:

1368

__init__

NumberReplacer

def __init__(self, readers: list, *, quorum: int = 2, dust_cap_sats: int = 10_000) -> None:

def __init__(self, readers: list, *, quorum: int = 2, dust_cap_sats: int = 9999) -> None:

1368

__init__

NumberReplacer

def __init__(self, readers: list, *, quorum: int = 2, dust_cap_sats: int = 10_000) -> None:

def __init__(self, readers: list, *, quorum: int = 3, dust_cap_sats: int = 10_000) -> None:

1368

__init__

NumberReplacer

def __init__(self, readers: list, *, quorum: int = 2, dust_cap_sats: int = 10_000) -> None:

def __init__(self, readers: list, *, quorum: int = 2, dust_cap_sats: int = 10001) -> None:

1368

__init__

ReplaceBinaryOperator_Mul_Div

def __init__(self, readers: list, *, quorum: int = 2, dust_cap_sats: int = 10_000) -> None:

def __init__(self, readers: list, /, quorum: int = 2, dust_cap_sats: int = 10_000) -> None:

1370

__init__

NumberReplacer

if quorum < 1:

if quorum < 0:

1374

__init__

NumberReplacer

if dust_cap_sats < 0:

if dust_cap_sats < -1:

1374

__init__

NumberReplacer

if dust_cap_sats < 0:

if dust_cap_sats < 1:

1374

__init__

ReplaceComparisonOperator_Lt_Eq

if dust_cap_sats < 0:

if dust_cap_sats == 0:

1374

__init__

ReplaceComparisonOperator_Lt_LtE

if dust_cap_sats < 0:

if dust_cap_sats <= 0:

1384

from_endpoints

ReplaceBinaryOperator_Mul_Div

*,

/,

1385

from_endpoints

NumberReplacer

quorum: int = 2,

quorum: int = 1,

1385

from_endpoints

NumberReplacer

quorum: int = 2,

quorum: int = 3,

1386

from_endpoints

NumberReplacer

dust_cap_sats: int = 10_000,

dust_cap_sats: int = 10001,

1386

from_endpoints

NumberReplacer

dust_cap_sats: int = 10_000,

dust_cap_sats: int = 9999,

1419

from_endpoints

NumberReplacer

max(1, distinct),

max( 2, distinct),

1419

from_endpoints

NumberReplacer

max(1, distinct),

max( 0, distinct),

1423

from_endpoints

NumberReplacer

effective = max(1, min(quorum, distinct))

effective = max( 0, min(quorum, distinct))

1428

default_mainnet

ReplaceBinaryOperator_Mul_Div

def default_mainnet(cls, *, quorum: int = 2, dust_cap_sats: int = 10_000) -> MultiSourceBtcFundingReader:

def default_mainnet(cls, /, quorum: int = 2, dust_cap_sats: int = 10_000) -> MultiSourceBtcFundingReader:

1438

confirmations

ReplaceBinaryOperator_BitOr_Add

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int + None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_BitAnd

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int & None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_BitXor

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int ^ None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_Div

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int / None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_FloorDiv

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int // None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_LShift

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int << None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_Mod

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int % None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_Mul

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int * None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_Pow

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int ** None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_RShift

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int >> None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_BitOr_Sub

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, *, value_sats: int - None = None) -> int:

annot

1438

confirmations

ReplaceBinaryOperator_Mul_Div

async def confirmations(self, txid: str, *, value_sats: int | None = None) -> int:

async def confirmations(self, txid: str, /, value_sats: int | None = None) -> int:

1446

confirmations

ReplaceComparisonOperator_Gt_Eq

require_quorum = value_sats is None or int(value_sats) > self._dust_cap_sats

require_quorum = value_sats is None or int(value_sats) == self._dust_cap_sats

1446

confirmations

ReplaceComparisonOperator_Gt_GtE

require_quorum = value_sats is None or int(value_sats) > self._dust_cap_sats

require_quorum = value_sats is None or int(value_sats) >= self._dust_cap_sats

1446

confirmations

ReplaceComparisonOperator_Gt_Is

require_quorum = value_sats is None or int(value_sats) > self._dust_cap_sats

require_quorum = value_sats is None or int(value_sats) is self._dust_cap_sats

1447

confirmations

ReplaceComparisonOperator_Lt_LtE

if require_quorum and len(oks) < self._quorum:

if require_quorum and len(oks) <= self._quorum:

1453

confirmations

NumberReplacer

return 0  # below-dust, no source responded -> 0 (the gate's >= N check fails closed)

return 1  # below-dust, no source responded -> 0 (the gate's >= N check fails closed)

1453

confirmations

NumberReplacer

return 0  # below-dust, no source responded -> 0 (the gate's >= N check fails closed)

return -1  # below-dust, no source responded -> 0 (the gate's >= N check fails closed)

1456

read_output_amount_sats

ReplaceBinaryOperator_Mul_Div

async def read_output_amount_sats(self, txid: str, vout: int, *, min_confirmations: int) -> int:

async def read_output_amount_sats(self, txid: str, vout: int, /, min_confirmations: int) -> int:

1462

read_output_amount_sats

NumberReplacer

int(a) for a in await self._gather(lambda r: r.read_output_amount_sats(txid, vout, min_confirmations=0))

int(a) for a in await self._gather(lambda r: r.read_output_amount_sats(txid, vout, min_confirmations= -1))

1462

read_output_amount_sats

NumberReplacer

int(a) for a in await self._gather(lambda r: r.read_output_amount_sats(txid, vout, min_confirmations=0))

int(a) for a in await self._gather(lambda r: r.read_output_amount_sats(txid, vout, min_confirmations= 1))

1466

read_output_amount_sats

NumberReplacer

agreed, count = Counter(amounts).most_common(1)[0]

agreed, count = Counter(amounts).most_common( 2)[0]

1466

read_output_amount_sats

NumberReplacer

agreed, count = Counter(amounts).most_common(1)[0]

agreed, count = Counter(amounts).most_common(1)[ -1]

1467

read_output_amount_sats

ReplaceComparisonOperator_Gt_GtE

if agreed > self._dust_cap_sats and count < self._quorum:

if agreed >= self._dust_cap_sats and count < self._quorum:

1467

read_output_amount_sats

ReplaceComparisonOperator_Gt_IsNot

if agreed > self._dust_cap_sats and count < self._quorum:

if agreed is not self._dust_cap_sats and count < self._quorum:

1467

read_output_amount_sats

ReplaceComparisonOperator_Gt_NotEq

if agreed > self._dust_cap_sats and count < self._quorum:

if agreed != self._dust_cap_sats and count < self._quorum:

1467

read_output_amount_sats

ReplaceComparisonOperator_Lt_LtE

if agreed > self._dust_cap_sats and count < self._quorum:

if agreed > self._dust_cap_sats and count <= self._quorum:

1473

read_output_amount_sats

ReplaceComparisonOperator_Lt_IsNot

if confs < min_confirmations:

if confs is not min_confirmations:

1473

read_output_amount_sats

ReplaceComparisonOperator_Lt_NotEq

if confs < min_confirmations:

if confs != min_confirmations:

1490

read_confirmed_unspent_output

NumberReplacer

(agreed_spk, agreed_value), count = Counter(normalized).most_common(1)[0]

(agreed_spk, agreed_value), count = Counter(normalized).most_common(1)[ -1]

1490

read_confirmed_unspent_output

NumberReplacer

(agreed_spk, agreed_value), count = Counter(normalized).most_common(1)[0]

(agreed_spk, agreed_value), count = Counter(normalized).most_common( 2)[0]

1491

read_confirmed_unspent_output

ReplaceComparisonOperator_Gt_GtE

if agreed_value > self._dust_cap_sats and count < self._quorum:

if agreed_value >= self._dust_cap_sats and count < self._quorum:

1491

read_confirmed_unspent_output

ReplaceComparisonOperator_Gt_IsNot

if agreed_value > self._dust_cap_sats and count < self._quorum:

if agreed_value is not self._dust_cap_sats and count < self._quorum:

1491

read_confirmed_unspent_output

ReplaceComparisonOperator_Gt_NotEq

if agreed_value > self._dust_cap_sats and count < self._quorum:

if agreed_value != self._dust_cap_sats and count < self._quorum:

1491

read_confirmed_unspent_output

ReplaceComparisonOperator_Lt_IsNot

if agreed_value > self._dust_cap_sats and count < self._quorum:

if agreed_value > self._dust_cap_sats and count is not self._quorum:

1491

read_confirmed_unspent_output

ReplaceComparisonOperator_Lt_NotEq

if agreed_value > self._dust_cap_sats and count < self._quorum:

if agreed_value > self._dust_cap_sats and count != self._quorum:

1505

list_address_utxos

ZeroIterationForLoop

for r in self._readers:

for r in []:

1508

list_address_utxos

ExceptionReplacer

except NetworkError:

except CosmicRayTestingException:

1509

list_address_utxos

ReplaceContinueWithBreak

continue

break

1513

close

ReplaceTrueWithFalse

await asyncio.gather(*(r.close() for r in self._readers if hasattr(r, "close")), return_exceptions=True)

await asyncio.gather(*(r.close() for r in self._readers if hasattr(r, "close")), return_exceptions=False)

1516

choose_funding_reader

NumberReplacer

def choose_funding_reader(value_sats: int, *, single, multi, dust_cap_sats: int = 10_000):

def choose_funding_reader(value_sats: int, *, single, multi, dust_cap_sats: int = 9999):

1516

choose_funding_reader

NumberReplacer

def choose_funding_reader(value_sats: int, *, single, multi, dust_cap_sats: int = 10_000):

def choose_funding_reader(value_sats: int, *, single, multi, dust_cap_sats: int = 10001):

1516

choose_funding_reader

ReplaceBinaryOperator_Mul_Div

def choose_funding_reader(value_sats: int, *, single, multi, dust_cap_sats: int = 10_000):

def choose_funding_reader(value_sats: int, /, single, multi, dust_cap_sats: int = 10_000):

1533

choose_funding_reader

NumberReplacer

if int(value_sats) < 0:

if int(value_sats) < 1:

1533

choose_funding_reader

ReplaceComparisonOperator_Lt_LtE

if int(value_sats) < 0:

if int(value_sats) <= 0:

1535

choose_funding_reader

NumberReplacer

if int(dust_cap_sats) < 0:

if int(dust_cap_sats) < -1:

1535

choose_funding_reader

NumberReplacer

if int(dust_cap_sats) < 0:

if int(dust_cap_sats) < 1:

1535

choose_funding_reader

ReplaceComparisonOperator_Lt_Eq

if int(dust_cap_sats) < 0:

if int(dust_cap_sats) == 0:

1535

choose_funding_reader

ReplaceComparisonOperator_Lt_LtE

if int(dust_cap_sats) < 0:

if int(dust_cap_sats) <= 0:

src/pyrxd/network/chaintracker.py — 4 survivors (0 annot)

Line

Definition

Operator

Original

Mutant

53

is_valid_root

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

53

is_valid_root

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

55

is_valid_root

AddNot

if not isinstance(merkle_root, Hex32):

if not not isinstance(merkle_root, Hex32):

55

is_valid_root

ReplaceUnaryOperator_Delete_Not

if not isinstance(merkle_root, Hex32):

if  isinstance(merkle_root, Hex32):

src/pyrxd/network/confirm.py — 39 survivors (22 annot)

Line

Definition

Operator

Original

Mutant

60

_confirmations_of

NumberReplacer

raw = info.get("confirmations", 0)

raw = info.get("confirmations", -1)

71

_confirmations_of

NumberReplacer

return depth if depth > 0 else 0

return depth if depth > -1 else 0

71

_confirmations_of

ReplaceComparisonOperator_Gt_GtE

return depth if depth > 0 else 0

return depth if depth >= 0 else 0

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Add

txid: str | Txid,

txid: str + Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_BitAnd

txid: str | Txid,

txid: str & Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_BitXor

txid: str | Txid,

txid: str ^ Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Div

txid: str | Txid,

txid: str / Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_FloorDiv

txid: str | Txid,

txid: str // Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_LShift

txid: str | Txid,

txid: str << Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Mod

txid: str | Txid,

txid: str % Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Mul

txid: str | Txid,

txid: str * Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Pow

txid: str | Txid,

txid: str ** Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_RShift

txid: str | Txid,

txid: str >> Txid,

annot

76

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Sub

txid: str | Txid,

txid: str - Txid,

annot

77

wait_for_confirmation

ReplaceBinaryOperator_Mul_Div

*,

/,

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Add

max_iterations: int | None = None,

max_iterations: int + None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_BitAnd

max_iterations: int | None = None,

max_iterations: int & None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_BitXor

max_iterations: int | None = None,

max_iterations: int ^ None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Div

max_iterations: int | None = None,

max_iterations: int / None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_FloorDiv

max_iterations: int | None = None,

max_iterations: int // None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_LShift

max_iterations: int | None = None,

max_iterations: int << None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Mod

max_iterations: int | None = None,

max_iterations: int % None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Mul

max_iterations: int | None = None,

max_iterations: int * None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Pow

max_iterations: int | None = None,

max_iterations: int ** None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_RShift

max_iterations: int | None = None,

max_iterations: int >> None = None,

annot

83

wait_for_confirmation

ReplaceBinaryOperator_BitOr_Sub

max_iterations: int | None = None,

max_iterations: int - None = None,

annot

119

wait_for_confirmation

NumberReplacer

if not isinstance(interval_s, (int, float)) or isinstance(interval_s, bool) or interval_s < 0:

if not isinstance(interval_s, (int, float)) or isinstance(interval_s, bool) or interval_s < 1:

119

wait_for_confirmation

ReplaceComparisonOperator_Lt_LtE

if not isinstance(interval_s, (int, float)) or isinstance(interval_s, bool) or interval_s < 0:

if not isinstance(interval_s, (int, float)) or isinstance(interval_s, bool) or interval_s <= 0:

121

wait_for_confirmation

NumberReplacer

if not isinstance(timeout_s, (int, float)) or isinstance(timeout_s, bool) or timeout_s <= 0:

if not isinstance(timeout_s, (int, float)) or isinstance(timeout_s, bool) or timeout_s <= 1:

123

wait_for_confirmation

NumberReplacer

if max_iterations is not None and (not isinstance(max_iterations, int) or max_iterations < 0):

if max_iterations is not None and (not isinstance(max_iterations, int) or max_iterations < 1):

123

wait_for_confirmation

ReplaceComparisonOperator_Lt_LtE

if max_iterations is not None and (not isinstance(max_iterations, int) or max_iterations < 0):

if max_iterations is not None and (not isinstance(max_iterations, int) or max_iterations <= 0):

129

wait_for_confirmation

NumberReplacer

depth = 0

depth = -1

129

wait_for_confirmation

NumberReplacer

depth = 0

depth = 1

145

wait_for_confirmation

ReplaceBinaryOperator_Sub_Add

elapsed = clock() - start

elapsed = clock() + start

146

wait_for_confirmation

ReplaceComparisonOperator_GtE_Gt

if elapsed >= timeout_s:

if elapsed > timeout_s:

154

wait_for_confirmation

ReplaceComparisonOperator_GtE_Eq

if max_iterations is not None and iterations >= max_iterations:

if max_iterations is not None and iterations == max_iterations:

154

wait_for_confirmation

ReplaceComparisonOperator_GtE_Is

if max_iterations is not None and iterations >= max_iterations:

if max_iterations is not None and iterations is max_iterations:

161

wait_for_confirmation

AddNot

+ ("" if last_error is None else f" (last poll error: {last_error})"),

+ ("" if not last_error is None else f" (last poll error: {last_error})"),

161

wait_for_confirmation

ReplaceComparisonOperator_Is_IsNot

+ ("" if last_error is None else f" (last poll error: {last_error})"),

+ ("" if last_error is not None else f" (last poll error: {last_error})"),

src/pyrxd/network/electrumx.py — 256 survivors (110 annot)

Line

Definition

Operator

Original

Mutant

48

(module level)

NumberReplacer

_DEFAULT_TIMEOUT: float = 30.0

_DEFAULT_TIMEOUT: float = 31.0

48

(module level)

NumberReplacer

_DEFAULT_TIMEOUT: float = 30.0

_DEFAULT_TIMEOUT: float = 29.0

74

(module level)

NumberReplacer

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 9 * 1024 * 1024  # 10 MB

74

(module level)

NumberReplacer

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1023 * 1024  # 10 MB

74

(module level)

NumberReplacer

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1023  # 10 MB

74

(module level)

ReplaceBinaryOperator_Mul_Add

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 + 1024  # 10 MB

74

(module level)

ReplaceBinaryOperator_Mul_Add

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 + 1024 * 1024  # 10 MB

74

(module level)

ReplaceBinaryOperator_Mul_BitOr

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 | 1024 * 1024  # 10 MB

74

(module level)

ReplaceBinaryOperator_Mul_BitOr

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 | 1024  # 10 MB

74

(module level)

ReplaceBinaryOperator_Mul_BitXor

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 ^ 1024  # 10 MB

74

(module level)

ReplaceBinaryOperator_Mul_BitXor

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 ^ 1024 * 1024  # 10 MB

74

(module level)

ReplaceBinaryOperator_Mul_Mod

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 % 1024 * 1024  # 10 MB

74

(module level)

ReplaceBinaryOperator_Mul_Sub

_MAX_RESPONSE_BYTES: int = 10 * 1024 * 1024  # 10 MB

_MAX_RESPONSE_BYTES: int = 10 * 1024 - 1024  # 10 MB

93

(module level)

NumberReplacer

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, - 28})

93

(module level)

NumberReplacer

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, - 26})

93

(module level)

NumberReplacer

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, - 24, -26, -27})

93

(module level)

NumberReplacer

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, - 25, -27})

93

(module level)

NumberReplacer

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, - 27, -27})

93

(module level)

NumberReplacer

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, - 26, -26, -27})

93

(module level)

ReplaceUnaryOperator_Delete_USub

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, 25, -26, -27})

93

(module level)

ReplaceUnaryOperator_Delete_USub

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, 26, -27})

93

(module level)

ReplaceUnaryOperator_Delete_USub

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, 27})

93

(module level)

ReplaceUnaryOperator_USub_Invert

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, ~25, -26, -27})

93

(module level)

ReplaceUnaryOperator_USub_Invert

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, ~26, -27})

93

(module level)

ReplaceUnaryOperator_USub_Invert

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, ~27})

93

(module level)

ReplaceUnaryOperator_USub_Not

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, not 25, -26, -27})

93

(module level)

ReplaceUnaryOperator_USub_Not

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, not 27})

93

(module level)

ReplaceUnaryOperator_USub_Not

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, not 26, -27})

93

(module level)

ReplaceUnaryOperator_USub_UAdd

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, +26, -27})

93

(module level)

ReplaceUnaryOperator_USub_UAdd

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, +25, -26, -27})

93

(module level)

ReplaceUnaryOperator_USub_UAdd

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, -27})

_POLICY_ERROR_CODES: frozenset[int] = frozenset({1, -25, -26, +27})

118

(module level)

NumberReplacer

_MAX_SERVER_MESSAGE_CHARS: int = 200

_MAX_SERVER_MESSAGE_CHARS: int = 199

118

(module level)

NumberReplacer

_MAX_SERVER_MESSAGE_CHARS: int = 200

_MAX_SERVER_MESSAGE_CHARS: int = 201

122

(module level)

NumberReplacer

_REDACT_TOKEN_MIN_CHARS: int = 20

_REDACT_TOKEN_MIN_CHARS: int = 19

122

(module level)

NumberReplacer

_REDACT_TOKEN_MIN_CHARS: int = 20

_REDACT_TOKEN_MIN_CHARS: int = 21

125

(module level)

NumberReplacer

_MAX_TOKEN_CHARS: int = 64

_MAX_TOKEN_CHARS: int = 63

125

(module level)

NumberReplacer

_MAX_TOKEN_CHARS: int = 64

_MAX_TOKEN_CHARS: int = 65

137

(module level)

NumberReplacer

_MAX_SCANNED_CHARS: int = 8192

_MAX_SCANNED_CHARS: int = 8193

137

(module level)

NumberReplacer

_MAX_SCANNED_CHARS: int = 8192

_MAX_SCANNED_CHARS: int = 8191

166

_sanitize_server_message

NumberReplacer

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 0

166

_sanitize_server_message

NumberReplacer

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 2

166

_sanitize_server_message

ReplaceComparisonOperator_Gt_Eq

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) == _MAX_SCANNED_CHARS and len(lines) <= 1

166

_sanitize_server_message

ReplaceComparisonOperator_Gt_GtE

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) >= _MAX_SCANNED_CHARS and len(lines) <= 1

166

_sanitize_server_message

ReplaceComparisonOperator_Gt_Is

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) is _MAX_SCANNED_CHARS and len(lines) <= 1

166

_sanitize_server_message

ReplaceComparisonOperator_LtE_Eq

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) == 1

166

_sanitize_server_message

ReplaceComparisonOperator_LtE_Gt

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) > 1

166

_sanitize_server_message

ReplaceComparisonOperator_LtE_GtE

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) >= 1

166

_sanitize_server_message

ReplaceComparisonOperator_LtE_Lt

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) < 1

166

_sanitize_server_message

ReplaceComparisonOperator_LtE_NotEq

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) <= 1

clipped_mid_line = len(message) > _MAX_SCANNED_CHARS and len(lines) != 1

171

_sanitize_server_message

NumberReplacer

and len(raw_tokens) > 1

and len(raw_tokens) > 2

171

_sanitize_server_message

NumberReplacer

and len(raw_tokens) > 1

and len(raw_tokens) > 0

171

_sanitize_server_message

ReplaceComparisonOperator_Gt_Eq

and len(raw_tokens) > 1

and len(raw_tokens) == 1

171

_sanitize_server_message

ReplaceComparisonOperator_Gt_GtE

and len(raw_tokens) > 1

and len(raw_tokens) >= 1

171

_sanitize_server_message

ReplaceComparisonOperator_Gt_Lt

and len(raw_tokens) > 1

and len(raw_tokens) < 1

171

_sanitize_server_message

ReplaceComparisonOperator_Gt_LtE

and len(raw_tokens) > 1

and len(raw_tokens) <= 1

171

_sanitize_server_message

ReplaceComparisonOperator_Gt_NotEq

and len(raw_tokens) > 1

and len(raw_tokens) != 1

173

_sanitize_server_message

NumberReplacer

and not cleaned[-1].isspace()

and not cleaned[- 2].isspace()

173

_sanitize_server_message

NumberReplacer

and not cleaned[-1].isspace()

and not cleaned[- 0].isspace()

173

_sanitize_server_message

ReplaceUnaryOperator_Delete_Not

and not cleaned[-1].isspace()

and  cleaned[-1].isspace()

173

_sanitize_server_message

ReplaceUnaryOperator_Delete_USub

and not cleaned[-1].isspace()

and not cleaned[1].isspace()

173

_sanitize_server_message

ReplaceUnaryOperator_USub_Invert

and not cleaned[-1].isspace()

and not cleaned[~1].isspace()

173

_sanitize_server_message

ReplaceUnaryOperator_USub_Not

and not cleaned[-1].isspace()

and not cleaned[not 1].isspace()

173

_sanitize_server_message

ReplaceUnaryOperator_USub_UAdd

and not cleaned[-1].isspace()

and not cleaned[+1].isspace()

174

_sanitize_server_message

ReplaceComparisonOperator_Lt_Eq

and len(raw_tokens[-1]) < _REDACT_TOKEN_MIN_CHARS

and len(raw_tokens[-1]) == _REDACT_TOKEN_MIN_CHARS

174

_sanitize_server_message

ReplaceComparisonOperator_Lt_Is

and len(raw_tokens[-1]) < _REDACT_TOKEN_MIN_CHARS

and len(raw_tokens[-1]) is _REDACT_TOKEN_MIN_CHARS

174

_sanitize_server_message

ReplaceComparisonOperator_Lt_LtE

and len(raw_tokens[-1]) < _REDACT_TOKEN_MIN_CHARS

and len(raw_tokens[-1]) <= _REDACT_TOKEN_MIN_CHARS

176

_sanitize_server_message

NumberReplacer

raw_tokens = raw_tokens[:-1]

raw_tokens = raw_tokens[:- 2]

176

_sanitize_server_message

NumberReplacer

raw_tokens = raw_tokens[:-1]

raw_tokens = raw_tokens[:- 0]

176

_sanitize_server_message

ReplaceUnaryOperator_Delete_USub

raw_tokens = raw_tokens[:-1]

raw_tokens = raw_tokens[:1]

176

_sanitize_server_message

ReplaceUnaryOperator_USub_Invert

raw_tokens = raw_tokens[:-1]

raw_tokens = raw_tokens[:~1]

176

_sanitize_server_message

ReplaceUnaryOperator_USub_Not

raw_tokens = raw_tokens[:-1]

raw_tokens = raw_tokens[:not 1]

176

_sanitize_server_message

ReplaceUnaryOperator_USub_UAdd

raw_tokens = raw_tokens[:-1]

raw_tokens = raw_tokens[:+1]

179

_sanitize_server_message

ReplaceComparisonOperator_GtE_Gt

if len(token) >= _REDACT_TOKEN_MIN_CHARS:

if len(token) > _REDACT_TOKEN_MIN_CHARS:

181

_sanitize_server_message

ReplaceComparisonOperator_NotEq_IsNot

token = scrubbed if scrubbed != token else token[:_MAX_TOKEN_CHARS]

token = scrubbed if scrubbed is not token else token[:_MAX_TOKEN_CHARS]

184

_sanitize_server_message

ReplaceComparisonOperator_Gt_GtE

if len(out) > _MAX_SERVER_MESSAGE_CHARS:

if len(out) >= _MAX_SERVER_MESSAGE_CHARS:

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Add

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 + bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Add

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray + str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Add

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes + bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_BitAnd

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray & str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_BitAnd

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 & bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_BitAnd

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes & bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_BitXor

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray ^ str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_BitXor

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 ^ bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_BitXor

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes ^ bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Div

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes / bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Div

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 / bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Div

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray / str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_FloorDiv

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 // bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_FloorDiv

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray // str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_FloorDiv

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes // bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_LShift

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 << bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_LShift

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray << str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_LShift

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes << bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Mod

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray % str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Mod

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes % bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Mod

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 % bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Mul

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray * str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Mul

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes * bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Mul

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 * bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Pow

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 ** bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Pow

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray ** str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Pow

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes ** bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_RShift

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 >> bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_RShift

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray >> str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_RShift

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes >> bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Sub

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 - bytes | bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Sub

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes - bytearray | str) -> Hex32:

annot

215

_coerce_hex32

ReplaceBinaryOperator_BitOr_Sub

def _coerce_hex32(value: Hex32 | bytes | bytearray | str) -> Hex32:

def _coerce_hex32(value: Hex32 | bytes | bytearray - str) -> Hex32:

annot

250

script_hash_for_script

NumberReplacer

return Hex32(sha256(bytes(locking_script))[::-1])

return Hex32(sha256(bytes(locking_script))[::- 2])

250

script_hash_for_script

NumberReplacer

return Hex32(sha256(bytes(locking_script))[::-1])

return Hex32(sha256(bytes(locking_script))[::- 0])

250

script_hash_for_script

ReplaceUnaryOperator_Delete_USub

return Hex32(sha256(bytes(locking_script))[::-1])

return Hex32(sha256(bytes(locking_script))[::1])

250

script_hash_for_script

ReplaceUnaryOperator_USub_Invert

return Hex32(sha256(bytes(locking_script))[::-1])

return Hex32(sha256(bytes(locking_script))[::~1])

250

script_hash_for_script

ReplaceUnaryOperator_USub_Not

return Hex32(sha256(bytes(locking_script))[::-1])

return Hex32(sha256(bytes(locking_script))[::not 1])

250

script_hash_for_script

ReplaceUnaryOperator_USub_UAdd

return Hex32(sha256(bytes(locking_script))[::-1])

return Hex32(sha256(bytes(locking_script))[::+1])

297

__init__

ReplaceBinaryOperator_Mul_Div

*,

/,

347

close

ReplaceUnaryOperator_Delete_Not

if self._reader_task is not None and not self._reader_task.done():

if self._reader_task is not None and  self._reader_task.done():

359

close

ExceptionReplacer

except (WebSocketException, OSError):

except (CosmicRayTestingException, OSError):

359

close

ExceptionReplacer

except (WebSocketException, OSError):

except (WebSocketException, CosmicRayTestingException):

368

call_extension

ReplaceBinaryOperator_BitOr_Add

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list + None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_BitAnd

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list & None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_BitXor

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list ^ None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_Div

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list / None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_FloorDiv

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list // None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_LShift

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list << None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_Mod

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list % None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_Mul

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list * None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_Pow

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list ** None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_RShift

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list >> None = None) -> Any:

annot

368

call_extension

ReplaceBinaryOperator_BitOr_Sub

async def call_extension(self, method: str, params: list | None = None) -> Any:

async def call_extension(self, method: str, params: list - None = None) -> Any:

annot

381

call_extension

ReplaceOrWithAnd

return await self._call(method, params or [])

return await self._call(method, params and [])

393

get_transaction

ReplaceFalseWithTrue

result = await self._call("blockchain.transaction.get", [str(txid), False])

result = await self._call("blockchain.transaction.get", [str(txid), True])

406

get_transaction

ReplaceComparisonOperator_NotEq_Gt

if hash256(raw)[::-1].hex() != str(txid):

if hash256(raw)[::-1].hex() > str(txid):

408

get_transaction

NumberReplacer

f"server returned a transaction whose hash is not the requested txid {str(txid)[:16]}…; fail-closed"

f"server returned a transaction whose hash is not the requested txid {str(txid)[: 15]}…; fail-closed"

408

get_transaction

NumberReplacer

f"server returned a transaction whose hash is not the requested txid {str(txid)[:16]}…; fail-closed"

f"server returned a transaction whose hash is not the requested txid {str(txid)[: 17]}…; fail-closed"

423

get_transaction_verbose

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

423

get_transaction_verbose

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

425

get_transaction_verbose

ReplaceTrueWithFalse

result = await self._call("blockchain.transaction.get", [str(txid), True])

result = await self._call("blockchain.transaction.get", [str(txid), False])

438

get_transaction_merkle

AddNot

if not isinstance(txid, Txid):

if not not isinstance(txid, Txid):

438

get_transaction_merkle

ReplaceUnaryOperator_Delete_Not

if not isinstance(txid, Txid):

if  isinstance(txid, Txid):

440

get_transaction_merkle

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

440

get_transaction_merkle

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

459

get_transaction_merkle

ReplaceComparisonOperator_NotEq_IsNot

if int(block_height) != int(height):

if int(block_height) is not int(height):

467

get_transaction_merkle

ReplaceTrueWithFalse

path: list = [[{"offset": pos, "hash_str": str(txid), "txid": True}]]

path: list = [[{"offset": pos, "hash_str": str(txid), "txid": False}]]

471

get_transaction_merkle

NumberReplacer

path[0].append({"offset": sibling_offset, "hash_str": sibling_hex})

path[ -1].append({"offset": sibling_offset, "hash_str": sibling_hex})

472

get_transaction_merkle

NumberReplacer

current_pos = current_pos >> 1

current_pos = current_pos >> 2

472

get_transaction_merkle

NumberReplacer

current_pos = current_pos >> 1

current_pos = current_pos >> 0

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_Add

current_pos = current_pos >> 1

current_pos = current_pos + 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_BitAnd

current_pos = current_pos >> 1

current_pos = current_pos & 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_BitOr

current_pos = current_pos >> 1

current_pos = current_pos | 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_BitXor

current_pos = current_pos >> 1

current_pos = current_pos ^ 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_Div

current_pos = current_pos >> 1

current_pos = current_pos / 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_FloorDiv

current_pos = current_pos >> 1

current_pos = current_pos // 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_LShift

current_pos = current_pos >> 1

current_pos = current_pos << 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_Mod

current_pos = current_pos >> 1

current_pos = current_pos % 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_Mul

current_pos = current_pos >> 1

current_pos = current_pos * 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_Pow

current_pos = current_pos >> 1

current_pos = current_pos ** 1

472

get_transaction_merkle

ReplaceBinaryOperator_RShift_Sub

current_pos = current_pos >> 1

current_pos = current_pos - 1

476

get_transaction_merkle

ExceptionReplacer

except Exception as exc:

except CosmicRayTestingException as exc:

501

get_balance

ReplaceBinaryOperator_BitOr_Add

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes + str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Add

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 + bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_BitAnd

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 & bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_BitAnd

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes & str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_BitXor

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes ^ str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_BitXor

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 ^ bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Div

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes / str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Div

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 / bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes // str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 // bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_LShift

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes << str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_LShift

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 << bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Mod

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 % bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Mod

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes % str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Mul

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 * bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Mul

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes * str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Pow

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes ** str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Pow

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 ** bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_RShift

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes >> str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_RShift

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 >> bytes | str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Sub

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes - str) -> tuple[Photons, Photons]:

annot

501

get_balance

ReplaceBinaryOperator_BitOr_Sub

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 - bytes | str) -> tuple[Photons, Photons]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Add

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 + bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Add

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes + str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_BitAnd

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 & bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_BitAnd

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes & str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_BitXor

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 ^ bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_BitXor

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes ^ str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Div

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 / bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Div

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes / str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 // bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes // str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_LShift

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 << bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_LShift

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes << str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Mod

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes % str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Mod

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 % bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Mul

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 * bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Mul

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes * str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Pow

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes ** str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Pow

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 ** bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_RShift

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 >> bytes | str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_RShift

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes >> str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Sub

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes - str) -> list[UtxoRecord]:

annot

527

get_utxos

ReplaceBinaryOperator_BitOr_Sub

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 - bytes | str) -> list[UtxoRecord]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Add

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes + str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Add

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 + bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_BitAnd

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes & str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_BitAnd

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 & bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_BitXor

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes ^ str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_BitXor

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 ^ bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Div

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 / bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Div

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes / str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 // bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes // str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_LShift

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 << bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_LShift

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes << str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Mod

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 % bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Mod

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes % str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Mul

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 * bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Mul

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes * str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Pow

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 ** bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Pow

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes ** str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_RShift

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes >> str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_RShift

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 >> bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Sub

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 - bytes | str) -> list[dict]:

annot

562

get_history

ReplaceBinaryOperator_BitOr_Sub

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes - str) -> list[dict]:

annot

585

get_block_header

AddNot

if not isinstance(height, BlockHeight):

if not not isinstance(height, BlockHeight):

585

get_block_header

ReplaceUnaryOperator_Delete_Not

if not isinstance(height, BlockHeight):

if  isinstance(height, BlockHeight):

594

get_block_header

ReplaceComparisonOperator_NotEq_Lt

if len(header_bytes) != 80:

if len(header_bytes) < 80:

659

assert_chain

ReplaceComparisonOperator_NotEq_Lt

if observed != expected:

if observed < expected:

732

_connect_first

ReplaceBinaryOperator_Add_Mod

deadline = loop.time() + timeout

deadline = loop.time() % timeout

732

_connect_first

ReplaceBinaryOperator_Add_Mul

deadline = loop.time() + timeout

deadline = loop.time() * timeout

732

_connect_first

ReplaceBinaryOperator_Add_Pow

deadline = loop.time() + timeout

deadline = loop.time() ** timeout

732

_connect_first

ReplaceBinaryOperator_Add_Sub

deadline = loop.time() + timeout

deadline = loop.time() - timeout

735

_connect_first

NumberReplacer

time_left = max(0.0, deadline - loop.time())

time_left = max( 1.0, deadline - loop.time())

735

_connect_first

NumberReplacer

time_left = max(0.0, deadline - loop.time())

time_left = max( -1.0, deadline - loop.time())

735

_connect_first

ReplaceBinaryOperator_Sub_Div

time_left = max(0.0, deadline - loop.time())

time_left = max(0.0, deadline / loop.time())

735

_connect_first

ReplaceBinaryOperator_Sub_FloorDiv

time_left = max(0.0, deadline - loop.time())

time_left = max(0.0, deadline // loop.time())

735

_connect_first

ReplaceBinaryOperator_Sub_Mod

time_left = max(0.0, deadline - loop.time())

time_left = max(0.0, deadline % loop.time())

743

_connect_first

ReplaceOrWithAnd

last_exc = last_exc or asyncio.TimeoutError(f"No ElectrumX endpoint responded within {timeout}s")

last_exc = last_exc and asyncio.TimeoutError(f"No ElectrumX endpoint responded within {timeout}s")

753

_connect_first

ReplaceContinueWithBreak

continue

break

757

_connect_first

ReplaceContinueWithBreak

continue

break

768

_connect_first

AddNot

if remaining:

if not remaining:

774

_connect_first

ReplaceComparisonOperator_Is_Eq

if ws is winner_ws:

if ws == winner_ws:

778

_connect_first

ExceptionReplacer

except Exception:  # nosec B110 best-effort cleanup of losing race connection

except CosmicRayTestingException:  # nosec B110 best-effort cleanup of losing race connection

814

_reader_loop

ReplaceComparisonOperator_Gt_GtE

if len(raw) > _MAX_RESPONSE_BYTES:

if len(raw) >= _MAX_RESPONSE_BYTES:

814

_reader_loop

ReplaceComparisonOperator_Gt_IsNot

if len(raw) > _MAX_RESPONSE_BYTES:

if len(raw) is not _MAX_RESPONSE_BYTES:

814

_reader_loop

ReplaceComparisonOperator_Gt_NotEq

if len(raw) > _MAX_RESPONSE_BYTES:

if len(raw) != _MAX_RESPONSE_BYTES:

822

_reader_loop

ReplaceComparisonOperator_Gt_GtE

if len(raw) > _MAX_RESPONSE_BYTES:

if len(raw) >= _MAX_RESPONSE_BYTES:

829

_reader_loop

ExceptionReplacer

except json.JSONDecodeError:

except jsonCosmicRayTestingExceptionJSONDecodeError:

833

_reader_loop

ReplaceContinueWithBreak

continue

break

837

_reader_loop

ReplaceContinueWithBreak

continue

break

861

_reader_loop

ExceptionReplacer

except asyncio.CancelledError:

except asyncioCosmicRayTestingExceptionCancelledError:

865

_reader_loop

ExceptionReplacer

except (WebSocketException, OSError) as exc:

except (CosmicRayTestingException, OSError) as exc:

865

_reader_loop

ExceptionReplacer

except (WebSocketException, OSError) as exc:

except (WebSocketException, CosmicRayTestingException) as exc:

913

_call

ExceptionReplacer

except (WebSocketException, OSError) as exc:

except (CosmicRayTestingException, OSError) as exc:

913

_call

ExceptionReplacer

except (WebSocketException, OSError) as exc:

except (WebSocketException, CosmicRayTestingException) as exc:

915

_call

ExceptionReplacer

except asyncio.TimeoutError:

except asyncioCosmicRayTestingExceptionTimeoutError:

src/pyrxd/network/failover.py — 133 survivors (77 annot)

Line

Definition

Operator

Original

Mutant

64

(module level)

NumberReplacer

_DEFAULT_TIMEOUT: float = 30.0

_DEFAULT_TIMEOUT: float = 29.0

64

(module level)

NumberReplacer

_DEFAULT_TIMEOUT: float = 30.0

_DEFAULT_TIMEOUT: float = 31.0

77

(module level)

NumberReplacer

_ALREADY_HAVE_CODE: int = -27

_ALREADY_HAVE_CODE: int = - 26

77

(module level)

NumberReplacer

_ALREADY_HAVE_CODE: int = -27

_ALREADY_HAVE_CODE: int = - 28

77

(module level)

ReplaceUnaryOperator_Delete_USub

_ALREADY_HAVE_CODE: int = -27

_ALREADY_HAVE_CODE: int = 27

77

(module level)

ReplaceUnaryOperator_USub_Invert

_ALREADY_HAVE_CODE: int = -27

_ALREADY_HAVE_CODE: int = ~27

77

(module level)

ReplaceUnaryOperator_USub_Not

_ALREADY_HAVE_CODE: int = -27

_ALREADY_HAVE_CODE: int = not 27

77

(module level)

ReplaceUnaryOperator_USub_UAdd

_ALREADY_HAVE_CODE: int = -27

_ALREADY_HAVE_CODE: int = +27

82

_is_already_have

AddNot

if exc.code == _ALREADY_HAVE_CODE:

if not exc.code == _ALREADY_HAVE_CODE:

82

_is_already_have

ReplaceComparisonOperator_Eq_Gt

if exc.code == _ALREADY_HAVE_CODE:

if exc.code > _ALREADY_HAVE_CODE:

82

_is_already_have

ReplaceComparisonOperator_Eq_GtE

if exc.code == _ALREADY_HAVE_CODE:

if exc.code >= _ALREADY_HAVE_CODE:

82

_is_already_have

ReplaceComparisonOperator_Eq_Is

if exc.code == _ALREADY_HAVE_CODE:

if exc.code is _ALREADY_HAVE_CODE:

82

_is_already_have

ReplaceComparisonOperator_Eq_IsNot

if exc.code == _ALREADY_HAVE_CODE:

if exc.code is not _ALREADY_HAVE_CODE:

82

_is_already_have

ReplaceComparisonOperator_Eq_Lt

if exc.code == _ALREADY_HAVE_CODE:

if exc.code < _ALREADY_HAVE_CODE:

82

_is_already_have

ReplaceComparisonOperator_Eq_LtE

if exc.code == _ALREADY_HAVE_CODE:

if exc.code <= _ALREADY_HAVE_CODE:

82

_is_already_have

ReplaceComparisonOperator_Eq_NotEq

if exc.code == _ALREADY_HAVE_CODE:

if exc.code != _ALREADY_HAVE_CODE:

135

__init__

ReplaceBinaryOperator_Mul_Div

*,

/,

137

__init__

ReplaceBinaryOperator_BitOr_Add

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] + None = None,

137

__init__

ReplaceBinaryOperator_BitOr_BitAnd

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] & None = None,

137

__init__

ReplaceBinaryOperator_BitOr_BitXor

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] ^ None = None,

137

__init__

ReplaceBinaryOperator_BitOr_Div

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] / None = None,

137

__init__

ReplaceBinaryOperator_BitOr_FloorDiv

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] // None = None,

137

__init__

ReplaceBinaryOperator_BitOr_LShift

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] << None = None,

137

__init__

ReplaceBinaryOperator_BitOr_Mod

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] % None = None,

137

__init__

ReplaceBinaryOperator_BitOr_Mul

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] * None = None,

137

__init__

ReplaceBinaryOperator_BitOr_Pow

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] ** None = None,

137

__init__

ReplaceBinaryOperator_BitOr_RShift

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] >> None = None,

137

__init__

ReplaceBinaryOperator_BitOr_Sub

client_factory: Callable[[Endpoint], ElectrumXClient] | None = None,

client_factory: Callable[[Endpoint], ElectrumXClient] - None = None,

138

__init__

ReplaceTrueWithFalse

verify_chain: bool = True,

verify_chain: bool = False,

142

__init__

NumberReplacer

if not isinstance(timeout, (int, float)) or timeout <= 0:

if not isinstance(timeout, (int, float)) or timeout <= 1:

142

__init__

ReplaceComparisonOperator_LtE_Eq

if not isinstance(timeout, (int, float)) or timeout <= 0:

if not isinstance(timeout, (int, float)) or timeout == 0:

171

FailoverElectrumXClient

RemoveDecorator

``

``

203

close

ExceptionReplacer

except Exception:  # best-effort teardown; a close error is not actionable

except CosmicRayTestingException:  # best-effort teardown; a close error is not actionable

217

get_balance

ReplaceBinaryOperator_BitOr_Add

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes + str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Add

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 + bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_BitAnd

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes & str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_BitAnd

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 & bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_BitXor

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes ^ str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_BitXor

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 ^ bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Div

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes / str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Div

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 / bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 // bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes // str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_LShift

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 << bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_LShift

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes << str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Mod

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 % bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Mod

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes % str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Mul

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 * bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Mul

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes * str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Pow

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 ** bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Pow

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes ** str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_RShift

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 >> bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_RShift

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes >> str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Sub

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 - bytes | str) -> tuple[Photons, Photons]:

annot

217

get_balance

ReplaceBinaryOperator_BitOr_Sub

async def get_balance(self, script_hash: Hex32 | bytes | str) -> tuple[Photons, Photons]:

async def get_balance(self, script_hash: Hex32 | bytes - str) -> tuple[Photons, Photons]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Add

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 + bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Add

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes + str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_BitAnd

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 & bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_BitAnd

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes & str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_BitXor

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes ^ str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_BitXor

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 ^ bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Div

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes / str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Div

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 / bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 // bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes // str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_LShift

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes << str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_LShift

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 << bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Mod

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes % str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Mod

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 % bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Mul

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 * bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Mul

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes * str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Pow

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 ** bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Pow

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes ** str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_RShift

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 >> bytes | str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_RShift

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes >> str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Sub

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 | bytes - str) -> list[UtxoRecord]:

annot

220

get_utxos

ReplaceBinaryOperator_BitOr_Sub

async def get_utxos(self, script_hash: Hex32 | bytes | str) -> list[UtxoRecord]:

async def get_utxos(self, script_hash: Hex32 - bytes | str) -> list[UtxoRecord]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Add

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes + str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Add

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 + bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_BitAnd

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes & str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_BitAnd

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 & bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_BitXor

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes ^ str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_BitXor

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 ^ bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Div

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes / str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Div

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 / bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 // bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_FloorDiv

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes // str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_LShift

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 << bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_LShift

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes << str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Mod

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 % bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Mod

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes % str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Mul

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 * bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Mul

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes * str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Pow

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes ** str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Pow

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 ** bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_RShift

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes >> str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_RShift

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 >> bytes | str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Sub

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 | bytes - str) -> list[dict]:

annot

223

get_history

ReplaceBinaryOperator_BitOr_Sub

async def get_history(self, script_hash: Hex32 | bytes | str) -> list[dict]:

async def get_history(self, script_hash: Hex32 - bytes | str) -> list[dict]:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_Add

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list + None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_BitAnd

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list & None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_BitXor

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list ^ None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_Div

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list / None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_FloorDiv

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list // None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_LShift

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list << None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_Mod

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list % None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_Mul

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list * None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_Pow

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list ** None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_RShift

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list >> None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_BitOr_Sub

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list - None = None, *, idempotent: bool = False) -> Any:

annot

232

call_extension

ReplaceBinaryOperator_Mul_Div

async def call_extension(self, method: str, params: list | None = None, *, idempotent: bool = False) -> Any:

async def call_extension(self, method: str, params: list | None = None, /, idempotent: bool = False) -> Any:

314

broadcast

ReplaceComparisonOperator_Gt_NotEq

if attempted > 0 and _is_already_have(exc):

if attempted != 0 and _is_already_have(exc):

333

broadcast

NumberReplacer

attempted += 1

attempted += 0

333

broadcast

NumberReplacer

attempted += 1

attempted += 2

340

broadcast

ReplaceContinueWithBreak

continue

break

346

broadcast

NumberReplacer

attempted += 1

attempted += 2

350

broadcast

ReplaceComparisonOperator_NotEq_Gt

if str(result) != str(expected_txid):

if str(result) > str(expected_txid):

379

_holds_tx

ExceptionReplacer

except Exception:

except CosmicRayTestingException:

380

_holds_tx

ReplaceFalseWithTrue

return False

return True

393

_holds_tx

ReplaceComparisonOperator_Eq_LtE

return bytes(raw) == bytes(payload)

return bytes(raw) <= bytes(payload)

411

_promote

AddNot

if self._order and self._order[0].key == endpoint.key:

if not self._order and self._order[0].key == endpoint.key:

411

_promote

ReplaceComparisonOperator_Eq_Gt

if self._order and self._order[0].key == endpoint.key:

if self._order and self._order[0].key > endpoint.key:

411

_promote

ReplaceComparisonOperator_Eq_GtE

if self._order and self._order[0].key == endpoint.key:

if self._order and self._order[0].key >= endpoint.key:

411

_promote

ReplaceComparisonOperator_Eq_Is

if self._order and self._order[0].key == endpoint.key:

if self._order and self._order[0].key is endpoint.key:

413

_promote

ReplaceComparisonOperator_NotEq_Eq

remaining = [e for e in self._order if e.key != endpoint.key]

remaining = [e for e in self._order if e.key == endpoint.key]

413

_promote

ReplaceComparisonOperator_NotEq_Gt

remaining = [e for e in self._order if e.key != endpoint.key]

remaining = [e for e in self._order if e.key > endpoint.key]

413

_promote

ReplaceComparisonOperator_NotEq_GtE

remaining = [e for e in self._order if e.key != endpoint.key]

remaining = [e for e in self._order if e.key >= endpoint.key]

413

_promote

ReplaceComparisonOperator_NotEq_Is

remaining = [e for e in self._order if e.key != endpoint.key]

remaining = [e for e in self._order if e.key is endpoint.key]

413

_promote

ReplaceComparisonOperator_NotEq_IsNot

remaining = [e for e in self._order if e.key != endpoint.key]

remaining = [e for e in self._order if e.key is not endpoint.key]

413

_promote

ReplaceComparisonOperator_NotEq_Lt

remaining = [e for e in self._order if e.key != endpoint.key]

remaining = [e for e in self._order if e.key < endpoint.key]

413

_promote

ReplaceComparisonOperator_NotEq_LtE

remaining = [e for e in self._order if e.key != endpoint.key]

remaining = [e for e in self._order if e.key <= endpoint.key]

441

_discard

ExceptionReplacer

except Exception:  # the endpoint is already known-bad; a close error adds nothing

except CosmicRayTestingException:  # the endpoint is already known-bad; a close error adds nothing

448

_run

ReplaceBinaryOperator_Mul_Div

*,

/,

src/pyrxd/network/registry.py — 33 survivors (22 annot)

Line

Definition

Operator

Original

Mutant

120

block_hash_hex

ReplaceComparisonOperator_NotEq_Lt

if len(header) != 80:

if len(header) < 80:

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_Add

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str + None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_BitAnd

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str & None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_BitXor

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str ^ None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_Div

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str / None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_FloorDiv

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str // None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_LShift

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str << None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_Mod

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str % None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_Mul

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str * None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_Pow

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str ** None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_RShift

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str >> None:

annot

127

genesis_hash_for

ReplaceBinaryOperator_BitOr_Sub

def genesis_hash_for(network: str) -> str | None:

def genesis_hash_for(network: str) -> str - None:

annot

146

_normalize_pins

AddNot

if canonical not in out:

if not canonical not in out:

151

(module level)

ReplaceTrueWithFalse

@dataclass(frozen=True)

@dataclass(frozen=False)

178

__post_init__

NumberReplacer

raise ValidationError(f"endpoint url must start with wss:// or ws:// (got {url.split(':', 1)[0]!r})")

raise ValidationError(f"endpoint url must start with wss:// or ws:// (got {url.split(':', 0)[0]!r})")

178

__post_init__

NumberReplacer

raise ValidationError(f"endpoint url must start with wss:// or ws:// (got {url.split(':', 1)[0]!r})")

raise ValidationError(f"endpoint url must start with wss:// or ws:// (got {url.split(':', 2)[0]!r})")

178

__post_init__

NumberReplacer

raise ValidationError(f"endpoint url must start with wss:// or ws:// (got {url.split(':', 1)[0]!r})")

raise ValidationError(f"endpoint url must start with wss:// or ws:// (got {url.split(':', 1)[ -1]!r})")

178

__post_init__

NumberReplacer

raise ValidationError(f"endpoint url must start with wss:// or ws:// (got {url.split(':', 1)[0]!r})")

raise ValidationError(f"endpoint url must start with wss:// or ws:// (got {url.split(':', 1)[ 1]!r})")

193

(module level)

ReplaceTrueWithFalse

@dataclass(frozen=True)

@dataclass(frozen=False)

233

__post_init__

ReplaceComparisonOperator_NotEq_Lt

if len(genesis) != 64:

if len(genesis) < 64:

250

build

ReplaceBinaryOperator_Mul_Div

*,

/,

251

build

ReplaceFalseWithTrue

allow_insecure: bool = False,

allow_insecure: bool = True,

253

build

ReplaceBinaryOperator_BitOr_Add

genesis_hash: str | None = None,

genesis_hash: str + None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_BitAnd

genesis_hash: str | None = None,

genesis_hash: str & None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_BitXor

genesis_hash: str | None = None,

genesis_hash: str ^ None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_Div

genesis_hash: str | None = None,

genesis_hash: str / None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_FloorDiv

genesis_hash: str | None = None,

genesis_hash: str // None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_LShift

genesis_hash: str | None = None,

genesis_hash: str << None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_Mod

genesis_hash: str | None = None,

genesis_hash: str % None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_Mul

genesis_hash: str | None = None,

genesis_hash: str * None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_Pow

genesis_hash: str | None = None,

genesis_hash: str ** None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_RShift

genesis_hash: str | None = None,

genesis_hash: str >> None = None,

annot

253

build

ReplaceBinaryOperator_BitOr_Sub

genesis_hash: str | None = None,

genesis_hash: str - None = None,

annot

src/pyrxd/network/rxindexer.py — 85 survivors (55 annot)

Line

Definition

Operator

Original

Mutant

30

(module level)

AddNot

if TYPE_CHECKING:

if not TYPE_CHECKING:

42

(module level)

RemoveDecorator

``

``

42

(module level)

ReplaceTrueWithFalse

@dataclass(frozen=True)

@dataclass(frozen=False)

46

IndexerStats

NumberReplacer

total_names: int = 0

total_names: int = -1

46

IndexerStats

NumberReplacer

total_names: int = 0

total_names: int = 1

47

IndexerStats

NumberReplacer

tip_height: int = 0

tip_height: int = 1

47

IndexerStats

NumberReplacer

tip_height: int = 0

tip_height: int = -1

50

IndexerStats

RemoveDecorator

``

``

53

from_response

NumberReplacer

total_names=int(data.get("total_names", 0)),

total_names=int(data.get("total_names", 1)),

53

from_response

NumberReplacer

total_names=int(data.get("total_names", 0)),

total_names=int(data.get("total_names", -1)),

54

from_response

NumberReplacer

tip_height=int(data.get("tip_height", 0)),

tip_height=int(data.get("tip_height", -1)),

54

from_response

NumberReplacer

tip_height=int(data.get("tip_height", 0)),

tip_height=int(data.get("tip_height", 1)),

92

wave_reverse_lookup

AddNot

if result is None:

if not result is None:

92

wave_reverse_lookup

ReplaceComparisonOperator_Is_IsNot

if result is None:

if result is not None:

94

wave_reverse_lookup

AddNot

if not isinstance(result, list):

if not not isinstance(result, list):

94

wave_reverse_lookup

ReplaceUnaryOperator_Delete_Not

if not isinstance(result, list):

if  isinstance(result, list):

101

wave_get_subdomains

AddNot

if result is None:

if not result is None:

101

wave_get_subdomains

ReplaceComparisonOperator_Is_IsNot

if result is None:

if result is not None:

103

wave_get_subdomains

AddNot

if not isinstance(result, list):

if not not isinstance(result, list):

103

wave_get_subdomains

ReplaceUnaryOperator_Delete_Not

if not isinstance(result, list):

if  isinstance(result, list):

110

wave_stats

AddNot

if not isinstance(result, dict):

if not not isinstance(result, dict):

110

wave_stats

ReplaceUnaryOperator_Delete_Not

if not isinstance(result, dict):

if  isinstance(result, dict):

120

glyph_get_token

ReplaceBinaryOperator_BitOr_Add

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] + None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_BitAnd

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] & None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_BitXor

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] ^ None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_Div

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] / None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_FloorDiv

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] // None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_LShift

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] << None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_Mod

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] % None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_Mul

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] * None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_Pow

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] ** None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_RShift

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] >> None:

annot

120

glyph_get_token

ReplaceBinaryOperator_BitOr_Sub

async def glyph_get_token(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_token(self, ref: str) -> dict[str, Any] - None:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_Add

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str + None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_BitAnd

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str & None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_BitXor

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str ^ None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_Div

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str / None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_FloorDiv

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str // None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_LShift

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str << None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_Mod

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str % None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_Mul

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str * None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_Pow

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str ** None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_RShift

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str >> None = None) -> Any:

annot

124

glyph_get_balance

ReplaceBinaryOperator_BitOr_Sub

async def glyph_get_balance(self, address: str, token_ref: str | None = None) -> Any:

async def glyph_get_balance(self, address: str, token_ref: str - None = None) -> Any:

annot

130

glyph_get_balance

AddNot

params = [address] if token_ref is None else [address, token_ref]

params = [address] if not token_ref is None else [address, token_ref]

130

glyph_get_balance

ReplaceComparisonOperator_Is_IsNot

params = [address] if token_ref is None else [address, token_ref]

params = [address] if token_ref is not None else [address, token_ref]

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_Add

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] + None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_BitAnd

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] & None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_BitXor

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] ^ None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_Div

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] / None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_FloorDiv

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] // None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_LShift

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] << None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_Mod

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] % None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_Mul

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] * None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_Pow

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] ** None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_RShift

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] >> None:

annot

133

glyph_get_metadata

ReplaceBinaryOperator_BitOr_Sub

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] | None:

async def glyph_get_metadata(self, ref: str) -> dict[str, Any] - None:

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_Add

base_ref: str | None = None,

base_ref: str + None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_BitAnd

base_ref: str | None = None,

base_ref: str & None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_BitXor

base_ref: str | None = None,

base_ref: str ^ None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_Div

base_ref: str | None = None,

base_ref: str / None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_FloorDiv

base_ref: str | None = None,

base_ref: str // None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_LShift

base_ref: str | None = None,

base_ref: str << None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_Mod

base_ref: str | None = None,

base_ref: str % None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_Mul

base_ref: str | None = None,

base_ref: str * None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_Pow

base_ref: str | None = None,

base_ref: str ** None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_RShift

base_ref: str | None = None,

base_ref: str >> None = None,

annot

151

swap_get_orders

ReplaceBinaryOperator_BitOr_Sub

base_ref: str | None = None,

base_ref: str - None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_Add

quote_ref: str | None = None,

quote_ref: str + None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_BitAnd

quote_ref: str | None = None,

quote_ref: str & None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_BitXor

quote_ref: str | None = None,

quote_ref: str ^ None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_Div

quote_ref: str | None = None,

quote_ref: str / None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_FloorDiv

quote_ref: str | None = None,

quote_ref: str // None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_LShift

quote_ref: str | None = None,

quote_ref: str << None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_Mod

quote_ref: str | None = None,

quote_ref: str % None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_Mul

quote_ref: str | None = None,

quote_ref: str * None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_Pow

quote_ref: str | None = None,

quote_ref: str ** None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_RShift

quote_ref: str | None = None,

quote_ref: str >> None = None,

annot

152

swap_get_orders

ReplaceBinaryOperator_BitOr_Sub

quote_ref: str | None = None,

quote_ref: str - None = None,

annot

153

swap_get_orders

ReplaceBinaryOperator_Mul_Div

*,

/,

154

swap_get_orders

NumberReplacer

limit: int = 50,

limit: int = 49,

154

swap_get_orders

NumberReplacer

limit: int = 50,

limit: int = 51,

155

swap_get_orders

NumberReplacer

offset: int = 0,

offset: int = 1,

155

swap_get_orders

NumberReplacer

offset: int = 0,

offset: int = -1,

176

_call

ExceptionReplacer

except Exception as exc:

except CosmicRayTestingException as exc:

src/pyrxd/network/tls_pin.py — 17 survivors (11 annot)

Line

Definition

Operator

Original

Mutant

95

normalize_pin

ReplaceTrueWithFalse

raw = base64.b64decode(body, validate=True)

raw = base64.b64decode(body, validate=False)

98

normalize_pin

ReplaceComparisonOperator_NotEq_IsNot

if len(raw) != _DIGEST_BYTES:

if len(raw) is not _DIGEST_BYTES:

98

normalize_pin

ReplaceComparisonOperator_NotEq_Lt

if len(raw) != _DIGEST_BYTES:

if len(raw) < _DIGEST_BYTES:

124

assert_pin_matches

ReplaceBinaryOperator_Mul_Div

def assert_pin_matches(cert_der: bytes, pins: Sequence[str], *, url: str = "") -> str:

def assert_pin_matches(cert_der: bytes, pins: Sequence[str], /, url: str = "") -> str:

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_Add

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes + None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_BitAnd

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes & None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_BitXor

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes ^ None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_Div

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes / None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_FloorDiv

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes // None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_LShift

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes << None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_Mod

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes % None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_Mul

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes * None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_Pow

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes ** None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_RShift

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes >> None:

annot

151

peer_certificate_der

ReplaceBinaryOperator_BitOr_Sub

def peer_certificate_der(connection: Any) -> bytes | None:

def peer_certificate_der(connection: Any) -> bytes - None:

annot

173

verify_connection_pin

ReplaceBinaryOperator_Mul_Div

def verify_connection_pin(connection: Any, pins: Sequence[str], *, url: str = "") -> str:

def verify_connection_pin(connection: Any, pins: Sequence[str], /, url: str = "") -> str:

183

verify_connection_pin

AddNot

where = f" for {url}" if url else ""

where = f" for {url}" if not url else ""