This adds a "walletconflicts" array to wallet transaction JSON output, identifying other wallet transactions that also spend one of the inputs of this transaction.
Example output from the txnmall.sh regression test, spending 1 BTC from account "foo", then spending 2 BTC of the change from that transaction and spending it from account "bar". After a mutant of the "foo" transaction is then mined listtransactions reports:
{
"account" : "foo",
"address" : "n2rhjnG8Gg24Dcx66u4KrtiUfxPhPw7suV",
"category" : "conflicted",
"amount" : -1.00000000,
"fee" : 0.00000000,
"confirmations" : -1,
"txid" : "650e1c572593ba03e407faebb613c1d449dfc450d3d3f3868566367f482a105b",
"walletconflicts" : [
"587573bb1b620604eb39f75377358411f34dd133a8846d50e8947091b208eb1b"
],
"time" : 1392405954,
"timereceived" : 1392405954
},
{
"account" : "bar",
"address" : "n2rhjnG8Gg24Dcx66u4KrtiUfxPhPw7suV",
"category" : "conflicted",
"amount" : -2.00000000,
"fee" : 0.00000000,
"confirmations" : -1,
"txid" : "222b3d25454a38de6ecd1c493692c7fce8848a2f8586825e4b32fe63c1f41d43",
"walletconflicts" : [
],
"time" : 1392405954,
"timereceived" : 1392405954
},
{
"account" : "foo",
"address" : "n2rhjnG8Gg24Dcx66u4KrtiUfxPhPw7suV",
"category" : "send",
"amount" : -1.00000000,
"fee" : 0.00000000,
"confirmations" : 1,
"blockhash" : "0000996962dbab0bf203ab187a683e7c610b2e946b3027c7ef167977dc1ea317",
"blockindex" : 1,
"blocktime" : 1392405954,
"txid" : "587573bb1b620604eb39f75377358411f34dd133a8846d50e8947091b208eb1b",
"walletconflicts" : [
"650e1c572593ba03e407faebb613c1d449dfc450d3d3f3868566367f482a105b"
],
"time" : 1392405954,
"timereceived" : 1392405954
}