How many confirmation do i have to wait before i can spend the inputs I already received?

2

2

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

Alberto

Posted 2015-06-02T13:24:15.583

Reputation: 51

Answers

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.

moshaholo

Posted 2015-06-02T13:24:15.583

Reputation: 575

what is a coinbase transaction?Patoshi パトシ 2018-07-31T15:51:47.947

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

tobixen

Posted 2015-06-02T13:24:15.583

Reputation: 756

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.

Lt.Bitcoin

Posted 2015-06-02T13:24:15.583

Reputation: 46