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

Method payment_queue_remove

src/Core/WalletHDsqlite.cpp:548–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548void WalletHDsqlite::payment_queue_remove(const Hash &tid) {
549 Hash tid_hash =
550 derive_from_key(m_wallet_key, "db_payment_queue_tid" + std::string(std::begin(tid.data), std::end(tid.data)));
551 Hash net_hash = derive_from_key(m_wallet_key, "db_payment_queue_net" + m_currency.net);
552
553 sqlite::Stmt stmt_del;
554 stmt_del.prepare(m_db_dbi, "DELETE FROM payment_queue WHERE net_hash = ? AND tid_hash = ?");
555 stmt_del.bind_blob(1, net_hash.data, sizeof(net_hash.data));
556 stmt_del.bind_blob(2, tid_hash.data, sizeof(tid_hash.data));
557 invariant(!stmt_del.step(), "");
558
559 if (tid.data[0] == 'x') // committing here is not so critical, improve speed here
560 commit();
561}
562
563void WalletHDsqlite::set_label(const std::string &address, const std::string &label) {
564 WalletHDBase::set_label(address, label);

Callers

nothing calls this directly

Calls 4

derive_from_keyFunction · 0.85
bind_blobMethod · 0.80
stepMethod · 0.80
prepareMethod · 0.45

Tested by

no test coverage detected