clean up fill transaction.
This commit is contained in:
parent
9d64341dd7
commit
b5c96e752f
@ -1285,9 +1285,6 @@ NAN_METHOD(FillTransaction) {
|
|||||||
|
|
||||||
CScript scriptPubKey = scriptPubKeyMain;
|
CScript scriptPubKey = scriptPubKeyMain;
|
||||||
|
|
||||||
CWalletTx wtxNew;
|
|
||||||
|
|
||||||
CReserveKey reservekey(pwalletMain);
|
|
||||||
int64_t nFeeRet = nTransactionFee;
|
int64_t nFeeRet = nTransactionFee;
|
||||||
|
|
||||||
if (pwalletMain->IsLocked()) {
|
if (pwalletMain->IsLocked()) {
|
||||||
@ -1296,9 +1293,6 @@ NAN_METHOD(FillTransaction) {
|
|||||||
|
|
||||||
CCoinControl* coinControl = new CCoinControl();
|
CCoinControl* coinControl = new CCoinControl();
|
||||||
|
|
||||||
vector< pair<CScript, int64_t> > vecSend;
|
|
||||||
vecSend.push_back(make_pair(scriptPubKey, nValue));
|
|
||||||
|
|
||||||
int64_t nTotalValue = nValue + nFeeRet;
|
int64_t nTotalValue = nValue + nFeeRet;
|
||||||
set<pair<const CWalletTx*,unsigned int> > setCoins;
|
set<pair<const CWalletTx*,unsigned int> > setCoins;
|
||||||
int64_t nValueIn = 0;
|
int64_t nValueIn = 0;
|
||||||
@ -1310,10 +1304,9 @@ NAN_METHOD(FillTransaction) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fill inputs if they aren't already filled
|
// Fill inputs if they aren't already filled
|
||||||
if (tx.vin.empty()) {
|
tx.vin.clear();
|
||||||
BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) {
|
BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) {
|
||||||
tx.vin.push_back(CTxIn(coin.first->GetHash(), coin.second));
|
tx.vin.push_back(CTxIn(coin.first->GetHash(), coin.second));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sign everything
|
// Sign everything
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user