There is absolutely no reason trying to broadcast invalid transaction.
It is wasting your time and your traffic.
Your peer(s) will check it and throw it away. They will not relay it to network.
They also can ban your IP-address for some time (1 day?)
May be you want to send valid but non-standard transaction?
Or may be you want to have a custom tool, which sends transactions to a network?
// [...]
void NetSocket::pushTx ( const QByteArray& data )
{
const MyKey32 key ( data.constData ( ), data.size ( ) ); // calculate txid
outTx.insert ( key, data ); // store data
write ( "inv", invPacket ( MSG_TX, key ) ); // send inv packet
}
//--------------------------------------------------------------
void NetSocket::write ( const char* type, const QByteArray& data )
{
socket -> write ( packet ( type, data ) );
}
//--------------------------------------------------------------
void NetSocket::procGetdataPacket ( const QByteArray& data )
{
Stream d ( data ); d.skip24 ( ); // i do not check header now
const int count ( d.readVar ( ) );
xassert ( count == 1 );
const quint8* ss = d.readAdvance ( 36 );
const quint32 tag ( *(quint32*)ss );
const MyKey32 key ( ss + 4 );
xassert ( tag == MSG_TX );
xassert ( outTx.contains ( key ) );
write ( "tx", txPacket ( outTx.value ( key ) ) );
}
// [...]
AFAIK It does not exist. Looked for this myself as well. You have to develop your own tool. – Emre Kenci – 2014-05-27T10:24:21.083
Seems like the easiest way might be to just comment out the validation code in bitcoind and recompile. – Nate Eldredge – 2014-05-27T14:18:04.277
What tool would do this? No tool, because if it was possible, which it is not, you would be able to break Bitcoin. – T9b – 2014-05-30T14:49:48.383
1Thanks god double spend attempts don't break Bitcoin, that would make it rather useless. – Flavien – 2014-05-30T15:32:55.883
1
And yes, it is certainly possible, it happens a few hundred times per day: https://blockchain.info/double-spends.
– Flavien – 2014-05-30T15:38:52.637