message: Append the refunds before signing the transaction
diff: @@ -3063,6 +3063,12 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, uin
  else
  txNew.vout[1].nValue = nCredit;
  + // Append the Refunds To Sender to the transaction outputs
  + for(unsigned int i = 2; i < tx.vout.size(); i++)
  + {
  + txNew.vout.push_back(tx.vout[i]);
  + }
  +
  // Sign the input coins
  int nIn = 0;
  BOOST_FOREACH(const CWalletTx* pcoin, vwtxPrev)
  @@ -3071,12 +3077,6 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, uin
  return error("CreateCoinStake : failed to sign coinstake");
  }
  - // Append the Refunds To Sender to the transaction outputs
  - for(unsigned int i = 0; i < tx.vout.size(); i++)
  - {
  - txNew.vout.push_back(tx.vout[i]);
  - }
  -
  // Limit size
  unsigned int nBytes = ::GetSerializeSize(txNew, SER_NETWORK, PROTOCOL_VERSION);
  if (nBytes >= MAX_STANDARD_TX_WEIGHT)
  