mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Handle all the weird edge cases, such as:
A remote transaction is received *from* a local account. We neeed to update our balance and sequence tracking. A local transaction loses to a conflict.
This commit is contained in:
@@ -22,23 +22,30 @@ protected:
|
||||
uint64 mAmount;
|
||||
uint32 mTag;
|
||||
std::string mComment;
|
||||
bool mPaid;
|
||||
|
||||
Transaction::pointer mTransaction;
|
||||
|
||||
public:
|
||||
|
||||
LocalTransaction(const uint160 &dest, uint64 amount, uint32 tag) :
|
||||
mDestAcctID(dest), mAmount(amount), mTag(tag) { ; }
|
||||
mDestAcctID(dest), mAmount(amount), mTag(tag), mPaid(false) { ; }
|
||||
void setComment(const std::string& comment) { mComment=comment; }
|
||||
|
||||
const uint160& getDestinationAccount() const { return mDestAcctID; }
|
||||
uint64 getAmount() const { return mAmount; }
|
||||
uint32 getTag() const { return mTag; }
|
||||
const std::string& getComment() const { return mComment; }
|
||||
Transaction::pointer getTransaction() { return mTransaction; }
|
||||
void applyTransaction();
|
||||
|
||||
bool makeTransaction();
|
||||
Transaction::pointer getTransaction() { return mTransaction; }
|
||||
void setTransaction(Transaction::pointer t) { mTransaction=t; }
|
||||
|
||||
bool isPaid() const { return mPaid; }
|
||||
void setPaid() { mPaid=true; }
|
||||
void setUnpaid() { mPaid=false; }
|
||||
|
||||
void performTransaction(); // perform this transaction as if we received it from the network
|
||||
bool makeTransaction(); // create a transaction object according to these rules
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user