JoinMarket-Org / joinmarket

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

Standard/unambiguous successful tx print in console. #286

Open tailsjoin opened 9 years ago

tailsjoin commented 9 years ago

After a successful sendpayment using bitcoin-rpc you will see an output like this:

...5c512d5239ac088ace5bd6c00000000001976a914f91139b8c90e4a2b528e6192cd8f7efba9bc058e88ac00000000...']
[2015/10/20 00:00:00] created fully signed tx, ending
[2015/10/20 00:00:00] line was zero length
[2015/10/20 00:00:00] disconnected irc
[2015/10/20 00:00:00] ending irc

This doesn't necessarily even say that the tx was pushed to the network successfully.


When using blockr.io you get a confirmation like this:

...5c512d5239ac088ace5bd6c00000000001976a914f91139b8c90e4a2b528e6192cd8f7efba9bc058e88ac00000000...']
[2015/10/20 00:00:00] txid = [5ae00000001976a914f91139b8c90e..]
[2015/10/20 00:00:00] created fully signed tx, ending
[2015/10/20 00:00:00] line was zero length
[2015/10/20 00:00:00] disconnected irc
[2015/10/20 00:00:00] ending irc

Which at least inspires a little more confidence on first glance, and gives the user the txid without having to scroll back through the whole raw tx.

chris-belcher commented 9 years ago

The txid is printed in both case https://github.com/chris-belcher/joinmarket/blob/master/lib/taker.py#L209-L233

But bitcoin-rpc outputs the txhex twice for debugging. We could move to txid printing to after the call to pushtx()

tailsjoin commented 9 years ago

I think that would be a good solution.

I just know that for me, when I first used bitcoin-rpc for a sendpayment I wasn't sure if my tx pushed or not, then I checked my bitcoin debug.log and saw the wallet update, only then did I think to scroll back from the txhex to see the txid.