void UnspentTxOut::init(LMDBBlockDatabase *db, TxOut & txout, uint32_t blkNum, bool isMulti) { txHash_ = txout.getParentHash(db); txOutIndex_ = txout.getIndex(); txHeight_ = txout.getParentHeight(); value_ = txout.getValue(); script_ = txout.getScript(); isMultisigRef_ = isMulti; }
BinaryData Tx::getScrAddrForTxOut(uint32_t txOutIndex) { TxOut txout = getTxOutCopy(txOutIndex); return BtcUtils::getTxOutScrAddr(txout.getScript()); }