I don't know if there is an error in the scriptsig
generation method of input in P2PSH.
My address is a single signing address with one Private key, I created a transaction that will generate hex string via Bitcoinj.
script = ScriptBuilder.createOutputScript(key.getAddress(params));
Sha256Hash hashForSign = transaction.hashForSignature(i, script, SigHash.ALL, false);
ECDSASignature signature = eckey.sign(hashForSign);
TransactionSignature tranSign = new TransactionSignature(signature, SigHash.ALL, false);
scriptSig = ScriptBuilder.createInputScript(tranSign, eckey);
But it is not the same as the hex string generated by the client RPC, but I don't know where it is wrong.
I will be very grateful if you can help me.