void Tx::set(Coin::Transaction coin_tx, uint32_t timestamp, status_t status) { LOGGER(trace) << "Tx::set - fromCoinClasses(coin_tx);" << std::endl; fromCoinClasses(coin_tx); timestamp_ = timestamp; if (missingSigCount()) { status_ = UNSIGNED; } else { status_ = status; hash_ = coin_tx.getHashLittleEndian(); } coin_tx.clearScriptSigs(); unsigned_hash_ = coin_tx.getHashLittleEndian(); }
void Tx::set(Coin::Transaction coin_tx, uint32_t timestamp, status_t status, bool conflicting, bool checksigs) { //LOGGER(trace) << "Tx::set - fromCoinCore(coin_tx);" << std::endl; fromCoinCore(coin_tx); timestamp_ = timestamp; if (checksigs && missingSigCount()) { status_ = UNSIGNED; } else { status_ = status; hash_ = coin_tx.hash(); } conflicting_ = conflicting; coin_tx.clearScriptSigs(); unsigned_hash_ = coin_tx.hash(); updateTotals(); }
void SynchedVault::sendTx(Coin::Transaction& coin_tx) { uchar_vector hash = coin_tx.hash(); LOGGER(trace) << "SynchedVault::sendTx(" << hash.getHex() << ")" << std::endl; if (!m_bConnected) throw std::runtime_error("Not connected."); m_networkSync.sendTx(coin_tx); m_networkSync.getTx(hash); }
void onTx(Peer& peer, const Coin::Transaction& tx) { cout << endl << "Received transaction " << tx.getHashLittleEndian().getHex() << " from peer " << peer.name() << endl;// << tx.toIndentedString() << endl; }
bytes_t AccountModel::createRawTx(const QString& accountName, const std::vector<TaggedOutput>& outputs, uint64_t fee) { Coin::Transaction tx = createTx(accountName, outputs, fee); return tx.getSerialized(); }