Tx BlockDataViewer::getTxByHash(HashString const & txhash) const { checkBDMisReady(); if (config().armoryDbType == ARMORY_DB_SUPER) { LMDBEnv::Transaction tx(db_->dbEnv_[BLKDATA].get(), LMDB::ReadOnly); TxRef txrefobj = db_->getTxRef(txhash); if (!txrefobj.isNull()) return txrefobj.attached(db_).getTxCopy(); else { // It's not in the blockchain, but maybe in the zero-conf tx list return zeroConfCont_.getTxByHash(txhash); } } else { StoredTx stx; if (db_->getStoredTx_byHash(txhash, &stx)) return stx.getTxCopy(); else return zeroConfCont_.getTxByHash(txhash); } }
Tx BlockDataViewer::getTxByHash(HashString const & txhash) const { StoredTx stx; if (db_->getStoredTx_byHash(txhash, &stx)) return stx.getTxCopy(); else return zeroConfCont_->getTxByHash(txhash); }