Making a new transaction transfer

2 replies 233 views
pixel1337Member
Posts: 2 · Reputation: 45
#1May 20, 2024, 05:58 PM
I’m working on a new transfer with NBitcoin and I have everything set up, but the transactions need to be sent out. I ran this code, everything looks good, but the transaction is still not showing up in the explorer. // Setting up a connection to the Bitcoin network using (var node = Node.Connect(Network.Main, "x9.dnsseed.bitcoin.dashjr.org")) {     node.VersionHandshake();     node.SendMessage(new InvPayload(InventoryType.MSG_TX, transaction.GetHash()));     node.SendMessage(new TxPayload(transaction));     Console.WriteLine("Transaction broadcasted successfully."); }
8 Reply Quote Share
im_apeHero Member
Posts: 629 · Reputation: 3824
#2May 23, 2024, 03:38 AM
I'm not familiar with that library but should you "await" the handshake first before sending the message? In any case if we assume the broadcast was successful (you can use WireShark to monitor your network and see the bitcoin messages sent to make sure), the reason why your tx doesn't appear in any explorer could be the transaction itself. It could be invalid (wrong signature, already spent inputs, etc.) non-standard or simply paying a low fee that led to the rejection of it by the other node.
0 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#3May 23, 2024, 04:15 AM
I'm also not familiar with that library. But looking at Luke's blog post on https://medium.com/@lukedashjr/malware-on-bitcoin-dns-seeds-not-a-problem-6f8dc3c0368b, x9.dnsseed.bitcoin.dashjr.org is a domain that acts as Bitcoin DNS Seeds rather than Bitcoin full node. You probably should try connect to different domain or IP address, such as ones listed on https://bitnodes.io/.
4 Reply Quote Share

Related topics