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.");
}
Making a new transaction transfer
2 replies 233 views
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.
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/.
Related topics
- Bitcoin Core displaying coins (UTXOs) in a new tab 13
- New Optional Hourglass Implementation is Live 3
- Hex data from the prenet genesis transaction 3
- Ideas for Boosting Bitcoin's Transaction Capacity 3
- Are you in favor of BIP-110? Let's get a Bitcoin poll going. 0
- Erlay seems to have some issues here’s a better proposal for a bitcoin protocol without invites 3