Author

Topic: Posting Transaction with C# NBitcoin (Read 331 times)

newbie
Activity: 2
Merit: 0
November 05, 2017, 08:01:10 AM
#3
You transaction is completely invalid and a double spend.

Your transaction spends from the 0'th output of 64c1fe8c9ebc8193b5f876e7aefdf5099661faaba3b73c6901f7433818ca5572 which has a value of 0.00496229 BTC. However you are creating two outputs with values 0.00496229 and 0.00474081. However this is clearly invalid because the value of your outputs is greater than the value of your inputs (i.e. spending more money than you are allowed to).

Furthermore, the input that you are spending was spent in 3e342736e6c2472327c8d925e56f02b213f2d79a65015957a2f1b68d8ecda9cd which is already confirmed, so your transaction is a double spend and thus even more invalid.

Thanks a lot man !
staff
Activity: 3458
Merit: 6793
Just writing some code
November 04, 2017, 10:36:40 PM
#2
You transaction is completely invalid and a double spend.

Your transaction spends from the 0'th output of 64c1fe8c9ebc8193b5f876e7aefdf5099661faaba3b73c6901f7433818ca5572 which has a value of 0.00496229 BTC. However you are creating two outputs with values 0.00496229 and 0.00474081. However this is clearly invalid because the value of your outputs is greater than the value of your inputs (i.e. spending more money than you are allowed to).

Furthermore, the input that you are spending was spent in 3e342736e6c2472327c8d925e56f02b213f2d79a65015957a2f1b68d8ecda9cd which is already confirmed, so your transaction is a double spend and thus even more invalid.
newbie
Activity: 2
Merit: 0
November 04, 2017, 04:26:05 PM
#1
Hy Everybody,

I have to admit that i am new to blockchain and bitcoin, butt this is what happend.
I used the NBitcoin Core = C# Object for creating bitcoin transactions.

I run throug the book == Great book, awsome explanation:
https://programmingblockchain.gitbooks.io/programmingblockchain/content/foreword.html

And created the transaction below:

{
  "hash": "129ebc483d161ffd1c1897f53a7d5818b84df938e10a96866d066f3d6e520712",
  "ver": 1,
  "vin_sz": 1,
  "vout_sz": 2,
  "lock_time": 0,
  "size": 225,
  "in": [
    {
      "prev_out": {
        "hash": "64c1fe8c9ebc8193b5f876e7aefdf5099661faaba3b73c6901f7433818ca5572",
        "n": 0
      },
      "scriptSig": "304402201642ec85f742462944f844dc80189cf028e88d4e984a1dec97f4103d87890e0c0220164 7ed9ace9bd04e3587294d16ab91d537c40979d7f7304c27d9e2ffb17e16ba01 0388739ebff541314d8aef003affa1482af9c6977e701ed55caf5cf2c7b9ddb234"
    }
  ],
  "out": [
    {
      "value": "0.00496229",
      "scriptPubKey": "OP_DUP OP_HASH160 a2d0096799fad13e61318a2e5fb7fa7b8e0c3ebf OP_EQUALVERIFY OP_CHECKSIG"
    },
    {
      "value": "0.00474081",
      "scriptPubKey": "OP_DUP OP_HASH160 d0a63ce1772ee44ff5d3330e790a6e7e0d6ae94a OP_EQUALVERIFY OP_CHECKSIG"
    }
  ]
}

And i posted it on the network via:

//BroadcastResponse broadcastResponse = client.Broadcast(transaction).Result

It returns:

//Success! You can check out the hash of the transaciton in any block explorer: 129ebc483d161ffd1c1897f53a7d5818b84df938e10a96866d066f3d6e520712

Now i tried to find the transcation, but without any succes.
Could u guys guide me in the right direction, cause i can't seem to find the error in this transaction.

Thanks in advance,

Best regards,

Mathias

Jump to: