Bitcoin Forum
September 23, 2018, 03:25:51 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Posting Transaction with C# NBitcoin  (Read 217 times)
Mz88
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 04, 2017, 09: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

1537716351
Hero Member
*
Offline Offline

Posts: 1537716351

View Profile Personal Message (Offline)

Ignore
1537716351
Reply with quote  #2

1537716351
Report to moderator
1537716351
Hero Member
*
Offline Offline

Posts: 1537716351

View Profile Personal Message (Offline)

Ignore
1537716351
Reply with quote  #2

1537716351
Report to moderator
1537716351
Hero Member
*
Offline Offline

Posts: 1537716351

View Profile Personal Message (Offline)

Ignore
1537716351
Reply with quote  #2

1537716351
Report to moderator
Einax Airdrops and Bounties made easy! List your ERC-20 token
FREE
ETH markets launching soon!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537716351
Hero Member
*
Offline Offline

Posts: 1537716351

View Profile Personal Message (Offline)

Ignore
1537716351
Reply with quote  #2

1537716351
Report to moderator
1537716351
Hero Member
*
Offline Offline

Posts: 1537716351

View Profile Personal Message (Offline)

Ignore
1537716351
Reply with quote  #2

1537716351
Report to moderator
1537716351
Hero Member
*
Offline Offline

Posts: 1537716351

View Profile Personal Message (Offline)

Ignore
1537716351
Reply with quote  #2

1537716351
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1650


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
November 05, 2017, 03:36:40 AM
 #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.

Mz88
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 05, 2017, 01:01:10 PM
 #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 !
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!