JoinMarket-Org / joinmarket

CoinJoin implementation with incentive structure to convince people to take part
398 stars 119 forks source link

Add unconfirmed coins to output from wallet-tool #39

Open AdamISZ opened 9 years ago

AdamISZ commented 9 years ago

(low priority but worth doing at some point)

BitPopCoin commented 9 years ago

This seems To be A blockr issue, I don't think they count unconfirmed by default, they're hostile

BitPopCoin commented 9 years ago

Including unconfirmed (zero confirmation) transactions.

Adding an optional parameter unconfirmed=1 to unspent API, the API searches and returns unspent transactions also among transactions that are not yet part of the blocks (unconfirmed transactions). Whenever unconfirmed=1 is used a new field "with_unconfirmed": true is added to the response to let developers know there are unsafe (unconfirmed) transactions in the output. http://btc.blockr.io/api/v1/address/unspent/198aMn6ZYAczwrE5NvNTUMyJ5qkfy4g3Hi?unconfirmed=1

chris-belcher commented 9 years ago

yes, the blockr.io API supports checking for unconfirmed transactions. It's also quite easy to use Bitcoin Core json-rpc for unconfirmed transactions. I'm also keen to use insight API as in #64 for further decentralization.

If you're planning to program this up and submit a pull request, be aware that makers should not send unconfirmed transactions are UTXO inputs.

chris-belcher commented 9 years ago

Note that this requires somewhat redesigning the Wallet class

chris-belcher commented 9 years ago

If we ever do this, be mindful of transaction malleability. See this thread for the havoc caused by poorly written handling of unconfirmed txes https://www.reddit.com/r/Bitcoin/comments/3nfb2y/eli5_for_double_spends_bitcoin_being_sent_twice/