0

I use createrawtransaction for create a rawtransaction with [] "zero inputs" and one output. I use fundrawtransaction for populate rawtrasaction with inputs.

{"method":"createrawtransaction","params":[[],{"mv8sTXT1FSAJENZNNoKb3BAHnersrC9c41":0.1}],"id":"null"}

{"method":"fundrawtransaction","params":["RESPONSE-CREATE-RAW-TRANSACTION",{"feeRate":"0.00031744"}],"id":"null"}

My question is, how many confirmations are the inputs added by fundrawtransaction? Can I configure the confirmations that the inputs will be selected?

1

There are many more parameters than number of confirmations for input selection. It mainly depends on the amounts used in the outputs because eventually enough inputs have to be used to cover the costs, which means unconfirmed inputs might be used if that's all what the wallet has.

If you want to control the number of minimum confirmations that an input must have before it's considered available for funding, there are two options:

spendzeroconfchange=0 will tell the wallet never to spend an unconfirmed input (0 disables spending, 1 enables it and is default), and txconfirmtarget=6 which will means that an input must be buried beneath at least 6 blocks.

You can change 6 to be something else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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