Improve Transaction Logging - Log Transactions at Initiation #8
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Improve Transaction Logging - Log Transactions at Initiation
Problem Description
Currently, the Orangemart plugin only logs transactions after they complete (either successfully or fail). This creates a gap in transaction tracking when:
The current logging behavior:
CheckPendingInvoices()
when invoice is paid/expiredCmdSendCurrency()
afterSendBitcoin()
completesCurrent Code Issues
Send Currency Flow
Buy Currency Flow
Proposed Solution
Implement immediate transaction logging with status updates:
1. Log Transaction Initiation
"INITIATED"
or"PENDING"
2. Update Log Entry During Processing
Status
field to log entry classesINITIATED → PROCESSING → COMPLETED/FAILED
3. Enhanced Log Entry Structure
4. Recovery on Plugin Load
INITIATED
orPROCESSING
transactionsImplementation Steps
SellInvoiceLogEntry
andBuyInvoiceLogEntry
CmdSendCurrency()
before callingSendBitcoin()
CmdBuyCurrency()
when invoice is createdOnServerInitialized()
to handle interrupted transactionsBenefits
Files to Modify
Orangemart.cs
- Main plugin fileCmdSendCurrency()
methodCmdBuyCurrency()
methodCheckPendingInvoices()
methodOnServerInitialized()
methodPriority
High - This addresses a potential data loss issue and improves transaction reliability.
Labels:
enhancement
,logging
,reliability
,transaction-tracking
Fixed on 0.4.0