clean up fill transaction.

This commit is contained in:
Christopher Jeffrey 2014-09-30 09:42:23 -07:00
parent 9d64341dd7
commit b5c96e752f
1 changed files with 3 additions and 10 deletions

View File

@ -1285,9 +1285,6 @@ NAN_METHOD(FillTransaction) {
CScript scriptPubKey = scriptPubKeyMain;
CWalletTx wtxNew;
CReserveKey reservekey(pwalletMain);
int64_t nFeeRet = nTransactionFee;
if (pwalletMain->IsLocked()) {
@ -1296,9 +1293,6 @@ NAN_METHOD(FillTransaction) {
CCoinControl* coinControl = new CCoinControl();
vector< pair<CScript, int64_t> > vecSend;
vecSend.push_back(make_pair(scriptPubKey, nValue));
int64_t nTotalValue = nValue + nFeeRet;
set<pair<const CWalletTx*,unsigned int> > setCoins;
int64_t nValueIn = 0;
@ -1310,10 +1304,9 @@ NAN_METHOD(FillTransaction) {
}
// Fill inputs if they aren't already filled
if (tx.vin.empty()) {
BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) {
tx.vin.push_back(CTxIn(coin.first->GetHash(), coin.second));
}
tx.vin.clear();
BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) {
tx.vin.push_back(CTxIn(coin.first->GetHash(), coin.second));
}
// Sign everything