Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.cpp
Show First 20 Lines • Show All 290 Lines • ▼ Show 20 Lines | public: | ||||
LookupBlockIndex(block_hash)); | LookupBlockIndex(block_hash)); | ||||
} | } | ||||
bool hasDescendantsInMempool(const TxId &txid) override { | bool hasDescendantsInMempool(const TxId &txid) override { | ||||
LOCK(::g_mempool.cs); | LOCK(::g_mempool.cs); | ||||
auto it = ::g_mempool.GetIter(txid); | auto it = ::g_mempool.GetIter(txid); | ||||
return it && (*it)->GetCountWithDescendants() > 1; | return it && (*it)->GetCountWithDescendants() > 1; | ||||
} | } | ||||
void relayTransaction(const TxId &txid) override { | void relayTransaction(const TxId &txid) override { | ||||
RelayTransaction(txid, *g_connman); | RelayTransaction(txid, *m_node.connman); | ||||
} | } | ||||
bool broadcastTransaction(const Config &config, | bool broadcastTransaction(const Config &config, | ||||
const CTransactionRef &tx, | const CTransactionRef &tx, | ||||
std::string &err_string, | std::string &err_string, | ||||
const Amount &max_tx_fee, | const Amount &max_tx_fee, | ||||
bool relay) override { | bool relay) override { | ||||
const TransactionError err = BroadcastTransaction( | const TransactionError err = BroadcastTransaction( | ||||
m_node, config, tx, err_string, max_tx_fee, relay, | m_node, config, tx, err_string, max_tx_fee, relay, | ||||
Show All 33 Lines | public: | ||||
unused_error_string); | unused_error_string); | ||||
} | } | ||||
CFeeRate estimateFee() const override { | CFeeRate estimateFee() const override { | ||||
return ::g_mempool.estimateFee(); | return ::g_mempool.estimateFee(); | ||||
} | } | ||||
CFeeRate relayMinFee() override { return ::minRelayTxFee; } | CFeeRate relayMinFee() override { return ::minRelayTxFee; } | ||||
CFeeRate relayDustFee() override { return ::dustRelayFee; } | CFeeRate relayDustFee() override { return ::dustRelayFee; } | ||||
bool getPruneMode() override { return ::fPruneMode; } | bool getPruneMode() override { return ::fPruneMode; } | ||||
bool p2pEnabled() override { return g_connman != nullptr; } | bool p2pEnabled() override { return m_node.connman != nullptr; } | ||||
bool isReadyToBroadcast() override { | bool isReadyToBroadcast() override { | ||||
return !::fImporting && !::fReindex && !isInitialBlockDownload(); | return !::fImporting && !::fReindex && !isInitialBlockDownload(); | ||||
} | } | ||||
bool isInitialBlockDownload() override { | bool isInitialBlockDownload() override { | ||||
return ::ChainstateActive().IsInitialBlockDownload(); | return ::ChainstateActive().IsInitialBlockDownload(); | ||||
} | } | ||||
bool shutdownRequested() override { return ShutdownRequested(); } | bool shutdownRequested() override { return ShutdownRequested(); } | ||||
int64_t getAdjustedTime() override { return GetAdjustedTime(); } | int64_t getAdjustedTime() override { return GetAdjustedTime(); } | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |