Can I test the transaction will go through without broadcasting it?
You can use the
testmempoolaccept command.
Thanks. testmempoolaccept is the command I was looking for. According to
https://bitcoincore.org/en/doc/0.20.0/rpc/rawtransactions/testmempoolaccept/ the result can be true or false.
I checked with a transaction that was already broadcasted and obviously it returned as false because the inputs are not present anymore.
{
"txid": "c77c...042b",
"allowed": false,
"reject-reason": "missing-inputs"
}
If a transaction is not broadcasted yet, does this also check if the inputs are signed or not?
Or, what are all the "reject-reason"-s messages I can receive? Couldn't find it anywhere.