Detect reverted transactions (#355)

* Detect reverted transactions

* Add reverted amount to funds display

* Support cancelling reverted txs

* Add reverted_after field for reverted transactions

* Update grin dependency to master branch

* Panic on failed test cleanup

* Only delete test dir if it exists

* Stop wallet proxy in accounts test

* Stop proxy thread in all controller tests

* Typo

* Add sleep after revert test

* Longer sleep in revert tests
This commit is contained in:
jaspervdm
2020-03-10 16:49:17 +01:00
committed by GitHub
parent 63eb25a92b
commit 7a95f42cc8
7 changed files with 674 additions and 47 deletions
+12
View File
@@ -304,6 +304,12 @@ pub fn info(
bFG->"Confirmed Total",
FG->amount_to_hr_string(wallet_info.total, false)
]);
if wallet_info.amount_reverted > 0 {
table.add_row(row![
Fr->format!("Reverted"),
Fr->amount_to_hr_string(wallet_info.amount_reverted, false)
]);
}
// Only dispay "Immature Coinbase" if we have related outputs in the wallet.
// This row just introduces confusion if the wallet does not receive coinbase rewards.
if wallet_info.amount_immature > 0 {
@@ -337,6 +343,12 @@ pub fn info(
bFG->"Total",
FG->amount_to_hr_string(wallet_info.total, false)
]);
if wallet_info.amount_reverted > 0 {
table.add_row(row![
Fr->format!("Reverted"),
Fr->amount_to_hr_string(wallet_info.amount_reverted, false)
]);
}
// Only dispay "Immature Coinbase" if we have related outputs in the wallet.
// This row just introduces confusion if the wallet does not receive coinbase rewards.
if wallet_info.amount_immature > 0 {