don't use temp txs variable

This commit is contained in:
woodser
2019-06-22 11:53:19 -04:00
parent 9591cd75f6
commit 9948e5c034
+2 -6
View File
@@ -106,16 +106,12 @@ namespace monero {
if (aTx->block != boost::none || tx->block != boost::none) {
if (aTx->block == boost::none) {
aTx->block = shared_ptr<MoneroBlock>(new MoneroBlock());
vector<shared_ptr<MoneroTx>> txs;
txs.push_back(tx);
(*aTx->block)->txs = txs;
(*aTx->block)->txs.push_back(tx);
(*aTx->block)->height = *tx->getHeight();
}
if (tx->block == boost::none) {
tx->block = shared_ptr<MoneroBlock>(new MoneroBlock());
vector<shared_ptr<MoneroTx>> txs;
txs.push_back(tx);
(*tx->block)->txs = txs;
(*tx->block)->txs.push_back(tx);
(*tx->block)->height = *aTx->getHeight();
}
(*aTx->block)->merge(*aTx->block, *tx->block);