Changeset View
Changeset View
Standalone View
Standalone View
src/bench/coin_selection.cpp
// Copyright (c) 2012-2016 The Bitcoin Core developers | // Copyright (c) 2012-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "bench.h" | #include "bench.h" | ||||
#include "wallet/wallet.h" | #include "wallet/wallet.h" | ||||
#include <set> | #include <set> | ||||
static void addCoin(const CAmount &nValue, const CWallet &wallet, | static void addCoin(const Amount nValue, const CWallet &wallet, | ||||
std::vector<COutput> &vCoins) { | std::vector<COutput> &vCoins) { | ||||
int nInput = 0; | int nInput = 0; | ||||
static int nextLockTime = 0; | static int nextLockTime = 0; | ||||
CMutableTransaction tx; | CMutableTransaction tx; | ||||
// so all transactions get different hashes | // so all transactions get different hashes | ||||
tx.nLockTime = nextLockTime++; | tx.nLockTime = nextLockTime++; | ||||
tx.vout.resize(nInput + 1); | tx.vout.resize(nInput + 1); | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |