blocktrail-sdk-nodejs icon indicating copy to clipboard operation
blocktrail-sdk-nodejs copied to clipboard

Check for double spending transactions

Open michelem09 opened this issue 7 years ago • 1 comments

Is there a way to send (in testnet of course) double spending transactions to understand how to discover them? Or is there a way to discover them from a transaction output?

michelem09 avatar May 11 '17 13:05 michelem09

I mean for example, this one was from me but I don't know why it appears as double-spent (may be the wallet client wasn't synced).

https://www.blocktrail.com/tBTC/tx/6c9c64535501d70d16f000a4cea0586f1baf1779740e31c8928e713b0573871b

And this is what I receive by the webhook:

{ network: 'tBTC',
  event_type: 'address-transactions',
  addresses: { '2N6aMCvkJRsKjaeHpxw9uPAYNZQ6nACehJS': 1000000 },
  data: 
   { raw: '01000000021a779c4d9293d715cff400cd7afe9d5e953a4a73589ca3dff02e539953016ab7010000006b483045022100e5346140b7c539b7330fed04daa55d01c8e89bea83ca175c7e53398295c1f38f02205ed951bb2e0e5dce469729e777644984e0221d5dab3f936837066a83044d50950121033c24bba0933aa44c166e8e3c96ef1b8b3552725b68efbb1230c704d56fda08b0fffffffff274986e6d7140e78147402b1283d45ee942d76a7797351a6747345d5397b914010000006a47304402203a0636b0ce9395588e4893b43074440b050c992774b8361a631bf9141f44480c02201e29aeb7694ac31d127d3d16a3d49157bfe6cf3ebc9ea705b9c229ffc8e027c6012103210d50d96ae92d8fc687c6075039cfd1d4816d2e8c66a31d5425698be7efad0dffffffff0240420f000000000017a9149237905137f840e4f28a429c69696959a5cb34ac8758c51000000000001976a914cf701e3a1bceeded59948e44cd674630f0d6929f88ac00000000',
     hash: '6c9c64535501d70d16f000a4cea0586f1baf1779740e31c8928e713b0573871b',
     first_seen_at: '2017-04-02T04:27:45+0000',
     last_seen_at: '2017-04-02T04:27:45+0000',
     block_height: null,
     block_time: null,
     block_hash: null,
     confirmations: 0,
     is_coinbase: false,
     estimated_value: 1099096,
     total_input_value: 2105316,
     total_output_value: 2099096,
     total_fee: 6220,
     estimated_change: 1000000,
     estimated_change_address: '2N6aMCvkJRsKjaeHpxw9uPAYNZQ6nACehJS',
     high_priority: true,
     enough_fee: false,
     contains_dust: false,
     inputs: 
      [ { index: 0,
          output_hash: 'b76a015399532ef0dfa39c58734a3a955e9dfe7acd00f4cf15d793924d9c771a',
          output_index: 1,
          output_confirmed: true,
          value: 1005316,
          sequence: 4294967295,
          address: 'mqBJUqoacFPqsguZGY9aN7Hp94VGVsStYp',
          type: 'pubkeyhash',
          multisig: null,
          multisig_addresses: null,
          script_signature: '483045022100e5346140b7c539b7330fed04daa55d01c8e89bea83ca175c7e53398295c1f38f02205ed951bb2e0e5dce469729e777644984e0221d5dab3f936837066a83044d50950121033c24bba0933aa44c166e8e3c96ef1b8b3552725b68efbb1230c704d56fda08b0' },
        { index: 1,
          output_hash: '14b997535d3447671a3597776ad742e95ed483122b404781e740716d6e9874f2',
          output_index: 1,
          output_confirmed: true,
          value: 1100000,
          sequence: 4294967295,
          address: 'mqvuWo5onTeXVsedWzYPSA7Tw4nk4RrYDp',
          type: 'pubkeyhash',
          multisig: null,
          multisig_addresses: null,
          script_signature: '47304402203a0636b0ce9395588e4893b43074440b050c992774b8361a631bf9141f44480c02201e29aeb7694ac31d127d3d16a3d49157bfe6cf3ebc9ea705b9c229ffc8e027c6012103210d50d96ae92d8fc687c6075039cfd1d4816d2e8c66a31d5425698be7efad0d' } ],
     outputs: 
      [ { index: 0,
          value: 1000000,
          address: '2N6aMCvkJRsKjaeHpxw9uPAYNZQ6nACehJS',
          type: 'scripthash',
          multisig: null,
          multisig_addresses: null,
          script: 'OP_HASH160 9237905137f840e4f28a429c69696959a5cb34ac OP_EQUAL',
          script_hex: 'a9149237905137f840e4f28a429c69696959a5cb34ac87',
          spent_hash: null,
          spent_index: 0 },
        { index: 1,
          value: 1099096,
          address: 'mzRnUs2L5W6m2ZyaPf62dsvyXUVai3w1Mw',
          type: 'pubkeyhash',
          multisig: null,
          multisig_addresses: null,
          script: 'OP_DUP OP_HASH160 cf701e3a1bceeded59948e44cd674630f0d6929f OP_EQUALVERIFY OP_CHECKSIG',
          script_hex: '76a914cf701e3a1bceeded59948e44cd674630f0d6929f88ac',
          spent_hash: null,
          spent_index: 0 } ],
     opt_in_rbf: false,
     unconfirmed_inputs: false,
     lock_time_timestamp: null,
     lock_time_block_height: null,
     size: 371 },
  retry_count: 0 }

Now, how can I mark it as double-spend my side too?

michelem09 avatar May 11 '17 14:05 michelem09