mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix applying transactions with a local destination to the wallet.
This commit is contained in:
@@ -43,6 +43,9 @@ Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans,
|
||||
|
||||
if((r==Ledger::TR_PREASEQ) || (r==Ledger::TR_BADLSEQ))
|
||||
{ // transaction should be held
|
||||
#ifdef DEBUG
|
||||
std::cerr << "Transaction should be held" << std::endl;
|
||||
#endif
|
||||
trans->setStatus(HELD);
|
||||
trans->save();
|
||||
theApp->getMasterLedger().addHeldTransaction(trans);
|
||||
@@ -50,12 +53,18 @@ Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans,
|
||||
}
|
||||
if( (r==Ledger::TR_PASTASEQ) || (r==Ledger::TR_ALREADY) )
|
||||
{ // duplicate or conflict
|
||||
#ifdef DEBUG
|
||||
std::cerr << "Transaction is obsolete" << std::endl;
|
||||
#endif
|
||||
trans->setStatus(OBSOLETE);
|
||||
return trans;
|
||||
}
|
||||
|
||||
if(r==Ledger::TR_SUCCESS)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
std::cerr << "Transaction is now included, synching to wallet" << std::endl;
|
||||
#endif
|
||||
trans->setStatus(INCLUDED);
|
||||
theApp->getWallet().applyTransaction(trans);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user