Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hathor/debug_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def render_GET(self, request: Request) -> bytes:
assert level in self.valid_log_levels
log_func = getattr(log, level)
msg = get_arg_default(raw_args, 'msg', self.default_log_msg)
# TODO: maybe add an `extras` param (probably as a json body via POST) to add arbitray structed attributes
# TODO: maybe add an `extras` param (probably as a json body via POST) to add arbitrarily structed attributes
log_func(msg)
return b'OK: no side-effects\n'

Expand Down
2 changes: 1 addition & 1 deletion hathor/difficulty.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- pdiff -> u256
- weight -> u256

From the above conversions it is possible to make all converions between (hash, target, bdiff, pdiff, weight) using
From the above conversions it is possible to make all conversions between (hash, target, bdiff, pdiff, weight) using
u256 as intermediary.

# References
Expand Down
2 changes: 1 addition & 1 deletion hathor/ipykernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, runtime_dir: Optional[str] = None):
# https://ipykernel.readthedocs.io/en/stable/api/ipykernel.html#ipykernel.kernelapp.IPKernelApp.connection_dir
# https://github.com/ipython/ipykernel/blob/main/ipykernel/kernelapp.py#L301-L320
# if not defined now, when init_connection_file is called it will be set to 'kernel-<PID>.json', it is
# defined now because it's more convinient to have a fixed path that doesn't depend on the PID of the
# defined now because it's more convenient to have a fixed path that doesn't depend on the PID of the
# running process, which doesn't benefit us anyway since the data dir
self.connection_dir = runtime_dir
self.connection_file = 'kernel.json'
Expand Down
2 changes: 1 addition & 1 deletion hathor/merged_mining/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def to_stratum_params(self) -> list:
[i[::-1].hex() for i in self.merkle_path],
encode_uint32(self.version)[::-1].hex(),
self.bits.hex(),
encode_uint32(self.timestamp)[::-1].hex(), # FIXME/TODO: verify actual endianess
encode_uint32(self.timestamp)[::-1].hex(), # FIXME/TODO: verify actual endianness
self.clean
]

Expand Down
4 changes: 2 additions & 2 deletions hathor/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ class Metrics:
def __post_init__(self) -> None:
self.log = logger.new()

# Stores caculated tx weights saved in tx storage
# Stores calculated tx weights saved in tx storage
self.weight_tx_deque: deque[WeightValue] = deque(maxlen=self.weight_tx_deque_len)

# Stores caculated block weights saved in tx storage
# Stores calculated block weights saved in tx storage
self.weight_block_deque: deque[WeightValue] = deque(maxlen=self.weight_block_deque_len)

# A timer to periodically collect data
Expand Down
4 changes: 2 additions & 2 deletions hathor/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ class sorted_merger(Iterator[T]):
""" Adaptor class to merge multiple sorted iterators into a single iterator that is also sorted.

Note: for this adaptor to work as expected the input iterators have to already be sorted, but if they aren't, the
resulting iterator won't crash, or unexpecetdly stop working, however it will not be sorted.
resulting iterator won't crash, or unexpectedly stop working, however it will not be sorted.

A custom key function can be supplied to customize the sort order, and the
reverse flag can be set to request the result in descending order.
Expand Down Expand Up @@ -697,7 +697,7 @@ def __next__(self) -> T:
if not self._iterators:
raise StopIteration
cmp = max if self._reverse else min
# XXX: this line bellow is correct, but it's just really hard to convince mypy of that, ignoring for now
# XXX: this line below is correct, but it's just really hard to convince mypy of that, ignoring for now
best_it = cmp(self._iterators, key=lambda it: self._key(it.peek())) # type: ignore
return next(best_it)

Expand Down
Loading