message: Require that input amount is provided for bitcoin-tx witness transactions
diff: @@ -617,7 +617,7 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
  }
  Coin newcoin;
  newcoin.out.scriptPubKey = scriptPubKey;
  - newcoin.out.nValue = 0;
  + newcoin.out.nValue = MAX_MONEY;
  if (prevOut.exists("amount")) {
  newcoin.out.nValue = AmountFromValue(prevOut["amount"]);
  }
  @@ -656,6 +656,10 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
  if (!fHashSingle || (i < mergedTx.vout.size()))
  ProduceSignature(keystore, MutableTransactionSignatureCreator(&mergedTx, i, amount, nHashType), prevPubKey, sigdata);
  + if (amount == MAX_MONEY && !sigdata.scriptWitness.IsNull()) {
  + throw std::runtime_error(strprintf("Missing amount for CTxOut with scriptPubKey=%s", HexStr(prevPubKey)));
  + }
  +
  UpdateInput(txin, sigdata);
  }
  