txouts needs to be in the order of tx.vin
| 166 | |
| 167 | // txouts needs to be in the order of tx.vin |
| 168 | TxSize CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wallet, const std::vector<CTxOut>& txouts, const CCoinControl* coin_control) |
| 169 | { |
| 170 | CMutableTransaction txNew(tx); |
| 171 | if (!wallet->DummySignTx(txNew, txouts, coin_control)) { |
| 172 | return TxSize{-1, -1}; |
| 173 | } |
| 174 | CTransaction ctx(txNew); |
| 175 | int64_t vsize = GetVirtualTransactionSize(ctx); |
| 176 | int64_t weight = GetTransactionWeight(ctx); |
| 177 | // ELEMENTS: use discounted vsize for CTs if enabled |
| 178 | if (Params().GetCreateDiscountCT()) { |
| 179 | vsize = GetDiscountVirtualTransactionSize(ctx); |
| 180 | } |
| 181 | |
| 182 | return TxSize{vsize, weight}; |
| 183 | } |
| 184 | |
| 185 | void AvailableCoins(const CWallet& wallet, std::vector<COutput> &vCoins, const CCoinControl *coinControl, const CAmount &nMinimumAmount, const CAmount &nMaximumAmount, const CAmount &nMinimumSumAmount, const uint64_t nMaximumCount, const CAsset* asset_filter) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet) |
| 186 | { |
no test coverage detected