Currently, there is not an RPC that allows for the validation of a raw transaction without actually submitting that transaction to the network. This PR implements verifyrawtransaction, which accepts a hex encoded raw transaction and determines if it could be included in the next block. It does this by creating a “fake” block with the proposed transaction, and then checking that the block is valid with TestBlockValidity.
This is my first attempt at contributing to bitcoin, so if I’ve already managed to break any unspoken (or spoken) rules, please let me know 😅