generate_key_image_helper only appended to additional_recv_derivations when
generate_key_derivation succeeded. A tx pubkey that is not a valid point makes
that call fail, so every later derivation shifted down one slot.
is_out_to_acc_precomp indexes that vector by the output index, so once the
list is short the lookup either falls off the bounds check or reads the
derivation belonging to a different output. Either way the helper reports that
the output does not belong to the address, and the wallet cannot build a key
image for an output it owns. Anyone who can put a transaction in front of the
wallet chooses those pubkeys.
The main tx pubkey a few lines up already handles a failed derivation by
keeping its slot and padding with identity, and wallet2 does the same in the
three places it builds this list (wallet2.cpp:2393, :7887, :13397). Do it here
too.
The lifetime test waited only for the client-side socket count to
reach zero before reconnecting. Because server-side inbound connections
are tracked separately, they may still be tearing down asynchronously,
causing the next connection attempt to fail with ECONNRESET on macOS.
Wait for both client and server connection accounting to drain before
the next reconnect. Also use the error_code connect overload so failures
are reported by gtest instead of escaping as uncaught Boost exceptions.
The block 202612 PoW workaround previously applied to any block at
height 202612. Restrict it to the object hashes of the known historical
mainnet, testnet, and stagenet block hashing blobs so new chains do not
inherit the fixed PoW hash, which would prevent sync or mining past that
height if their difficulty is higher.
Reported-by: DataHoarder
Co-authored-by: jeffro256 <jeffro256@tutanota.com>
Opening a file with a zero sharing mode makes read-only access exclusive
on Windows. Allow read and write sharing so callers can inspect files
that are already open, such as active log files.
Preserve line endings for test fixtures so file hashes remain stable
across platforms.
Temporarily release the wallet keys lock while inspecting the keys file,
then reacquire it and verify the lock state. This lets the test read the
file on Windows, where the lock prevents a concurrent read open.
Avoid passing possibly negative char values to std::isprint(), which is
undefined behavior except for EOF.
48080 and 58080 are within common ephemeral port ranges, which can
make node_server tests intermittently fail to bind after recently
closed TCP connections used the same local source port.
Use fixed unit-test ports outside those ranges and keep the tests on
127.0.0.1 instead of relying on 127.0.0.2 being configured.