File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -407,3 +407,29 @@ int TransactionRecord::getOutputIndex() const
407407{
408408 return idx;
409409}
410+
411+
412+ std::string TransactionRecord::statusToString (){
413+ switch (status.status ){
414+ case TransactionStatus::MaturesWarning:
415+ return " Abandoned (not mature because no nodes have confirmed)" ;
416+ case TransactionStatus::Confirmed:
417+ return " Confirmed" ;
418+ case TransactionStatus::OpenUntilDate:
419+ return " OpenUntilDate" ;
420+ case TransactionStatus::OpenUntilBlock:
421+ return " OpenUntilBlock" ;
422+ case TransactionStatus::Unconfirmed:
423+ return " Unconfirmed" ;
424+ case TransactionStatus::Confirming:
425+ return " Confirming" ;
426+ case TransactionStatus::Conflicted:
427+ return " Conflicted" ;
428+ case TransactionStatus::Immature:
429+ return " Immature" ;
430+ case TransactionStatus::NotAccepted:
431+ return " Not Accepted" ;
432+ default :
433+ return " No status" ;
434+ }
435+ }
Original file line number Diff line number Diff line change @@ -151,6 +151,10 @@ class TransactionRecord
151151 /* * Return whether a status update is needed.
152152 */
153153 bool statusUpdateNeeded ();
154+
155+ /* * Return transaction status
156+ */
157+ std::string statusToString ();
154158};
155159
156160#endif // BITCOIN_QT_TRANSACTIONRECORD_H
You can’t perform that action at this time.
0 commit comments