protected override void LogException(string txid, string message, DateTime date, DaemonTransactionType type) { m_database.Statement("INSERT INTO exceptions (txid, message, date, type) VALUES(@a,@b,@c,@d);", txid, message, date, type); }
// ------------------------------------------------------------------------------------------------------------ void InsertTransaction(string receivedTxid, string sentTxid, decimal amount, DaemonTransactionType type, string notes=null) { m_database.Statement( "INSERT INTO transactions (received_txid, sent_txid, asset, amount, date, type, notes) VALUES(@a,@b,@c,@d,@e,@f,@g);", receivedTxid, sentTxid, m_asset.symbol, amount, DateTime.UtcNow, type, notes); }
void MarkTransactionEnd(string receivedTxid, string sentTxid, decimal amount, DaemonTransactionType type, string notes=null) { m_database.Statement("UPDATE transactions SET sent_txid=@sent, amount=@amount, type=@type, notes=@notes WHERE received_txid=@txid;", sentTxid, amount, type, notes, receivedTxid); }
protected abstract void MarkTransactionAsRefundedEnd(string receivedTxid, string sentTxid, decimal amount, DaemonTransactionType type, string notes);
protected override void MarkTransactionAsRefundedEnd( string receivedTxid, string sentTxid, decimal amount, DaemonTransactionType type, string notes) { MarkTransactionEnd(receivedTxid, sentTxid, amount, type, notes); }
void MarkTransactionEnd(string receivedTxid, string sentTxid, decimal amount, DaemonTransactionType type, string notes = null) { m_database.Statement("UPDATE transactions SET sent_txid=@sent, amount=@amount, type=@type, notes=@notes WHERE received_txid=@txid;", sentTxid, amount, type, notes, receivedTxid); }
protected abstract void LogException(string txid, string message, DateTime date, DaemonTransactionType type);
// ------------------------------------------------------------------------------------------------------------ void InsertTransaction(string receivedTxid, string sentTxid, decimal amount, DaemonTransactionType type, string notes = null) { m_database.Statement("INSERT INTO transactions (received_txid, sent_txid, asset, amount, date, type, notes) VALUES(@a,@b,@c,@d,@e,@f,@g);", receivedTxid, sentTxid, m_asset.symbol, amount, DateTime.UtcNow, type, notes); }
protected override void MarkTransactionAsRefundedEnd(string receivedTxid, string sentTxid, decimal amount, DaemonTransactionType type, string notes) { MarkTransactionEnd(receivedTxid, sentTxid, amount, type, notes); }