The problem with Testnet is all types of transactions are allowed, so how can I know if a transaction would be rejected on mainet ?

1 Answer 1


You can use Bitcoin Core's testmempoolaccept RPC. It will tell you whether the transaction you give it would be accepted into your node's mempool at that time but won't actually add it to the mempool or broadcast it.

  • But then the question is how to convert a transaction to a full raw hex transaction ? Commented Apr 7, 2019 at 8:31
  • @user2284570 In what format do you have the transaction, if not raw hex? Commented Apr 7, 2019 at 16:53
  • @PieterWuille I have it in partial hex. I mean I have only the output in hex which means I would have expected something which would take the TxOut hex and the private key for automatically selecting utxo and perform signing. Commented Apr 8, 2019 at 10:04
  • You can create a transaction with no inputs using createrawtransaction, add inputs to it using fundrawtransaction, and then sign it with signrawtransactionwithwallet or signrawtransactionwithkey.
    – Ava Chow
    Commented Apr 8, 2019 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.