MCPcopy Create free account
hub / github.com/bcndev/bytecoin / process_payment_queue_send_error

Method process_payment_queue_send_error

src/Core/WalletState.cpp:254–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254void WalletState::process_payment_queue_send_error(Hash hash, const api::cnd::SendTransaction::Error &error) {
255 if (error.code == api::cnd::SendTransaction::INVALID_TRANSACTION_BINARY_FORMAT ||
256 ((error.code == api::cnd::SendTransaction::OUTPUT_ALREADY_SPENT ||
257 error.code == api::cnd::SendTransaction::WRONG_OUTPUT_REFERENCE) &&
258 get_tip_height() > error.conflict_height + m_config.payment_queue_confirmations)) {
259 m_log(logging::INFO) << "Removing transaction from PQ because send error " << error.what();
260 auto &by_hash_index = payment_queue.get<by_hash>();
261 auto git = by_hash_index.find(hash);
262 if (git != by_hash_index.end())
263 by_hash_index.erase(git);
264 remove_transaction_from_mempool(hash, true);
265 m_wallet.payment_queue_remove(hash);
266 m_tx_pool_version += 1;
267 }
268}
269
270const WalletState::QueueEntry *WalletState::find_in_payment_queue(const Hash &hash) {
271 auto &by_hash_index = payment_queue.get<by_hash>();

Callers 1

send_send_transactionMethod · 0.80

Calls 4

whatMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
payment_queue_removeMethod · 0.45

Tested by

no test coverage detected