Post
Topic
Board Games and rounds
Re: CoinWallet.eu Stress Test Cancelled + Bitcoin Giveaway
by
amaclin
on 24/09/2015, 17:03:26 UTC
But if they publish more keys then our bots are ready...
I have one more suggestion for your bot.
You should not just replace output to OP_RETURN and re-sign the inputs.
The bot should combine inputs to a set of 10-20-30 (up to you) items per one tx.
Have a look to the following code: it parses the incoming transactions and pushes txs with 11 (why not?) inputs and one output
Code:
{
  static UxToList list; // note: this is static variable!
  const QByteArray str ( QString ( "%1:%2" ).arg ( in.getHash ( ).toString ( ) ).arg ( in.getHashIndex ( ) ).toLatin1 ( ) );
  const UxTo uxto ( str.constData ( ), 1000, MyKey20::calc ( pub ).toString ( ).toLatin1 ( ).constData ( ) );
  if ( !list.contains ( uxto ) )
    list.append ( uxto );
  if ( list.size ( ) == 11 )
  {
    const QByteArray tx ( Transaction::rawTransaction ( list, ( ( 136 * list.size ( ) ) + 54 ) * 55 / 10 + 1 ) ); // 5.5 satoshi per byte
    const QByteArray packet ( NetSocket::packet ( TYPE_TX, data ) );
    emit pushTx ( packet );
    list.clear ( );
  }
}