This pull request modifies wallet_implicity_segwit.py
by adding support for Pay-to-Public-Key (P2PK) transactions. It addresses a previously noted TODO, which suggested that P2PK transactions will be nice to be tested as part of the wallet implicit segwit functionality. The modification expands the test to include transactions involving P2PK outputs, which are handled by Bitcoin Core in a non-native way (simulated using legacy addresses). The updated test ensures that Bitcoin Core correctly processes and recognizes P2PK transactions alongside legacy, Bech32, and P2SH-SegWit address types.
The reason behind this PR is to address the standing TODO—“Might be nice to test p2pk here too”—by explicitly testing the P2PK scenario. By generating a legacy address to retrieve the public key, creating a raw transaction, modifying its scriptPubKey to a P2PK format, and then funding, signing, and broadcasting it, this enhancement confirms that P2PK transactions are correctly processed both before and after node restarts.