2

Can I spend Inputs with 0 confirmations?? If I could, are there some restrictions?

1

If the input is coinbase transaction, you can't spent it until it get 100 confirmations. Relevant code is here
If the input is not a coinbase transaction, you can spend it by creating a raw transaction How To Create A Raw Transaction

However, receiving input with 0 confirmation is not recommended.

Zero-confirmation transaction vulnerability: accepting zero-confirmation transactions (transactions that have not yet been included in a block) from somebody you do not trust is still not recommended, because there will always be ways for attackers to double-spend zero-confirmation transactions. However, this release includes a bug fix that makes it a little bit more difficult for attackers to double-spend a certain type ("lockTime in the future") of zero-confirmation transaction.

1

With the exception of freshly mined coins, it is possible to spend unconfirmed funds - though it depends on which wallet you use. The bitcoin-core, cli version, will by default only spend funds with at least one confirmation, but it's possible to override, i.e. using the sendfrom command:

sendfrom "fromaccount" "tobitcoinaddress" amount ( minconf "comment" "comment-to" )

Set minconf to 0 and you're done.

Be aware of the trust issue; if you receive funds from someone you don't trust and send the coins further to someone that trusts you, you could put your reputation on line if the original sender pulls a double-spend.

If the original transaction carried a low fee and that's the reason why it hasn't been included in the blockchain yet, the new transaction may help to get it confirmed faster

0

If you are using Blockchain.info's wallet, you need to wait for 1 confirmation before spending it out. If your wallet has more than the amount you want to spend and that amount is not currently in any transaction or is un-confirmed, you can spend your coins easily.

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.