From 30f4b37e0f120f8d12e3cdc6858017a308e71b0f Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Sat, 16 Jun 2018 09:11:02 -0400 Subject: [PATCH 1/2] only throw the transaction error if the block didnt explicitly list it as failing --- libraries/chain/controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index f4fa0cf102e..d5429b83ddd 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -804,7 +804,8 @@ struct controller_impl { EOS_ASSERT( false, block_validate_exception, "encountered unexpected receipt type" ); } - if( trace && trace->except ) { + bool transaction_failed = trace && trace->except; + if( transaction_failed && receipt.status != transaction_receipt_header::hard_fail ) { edump((*trace)); throw *trace->except; } From fefe88f048a9c870d9de5271a2c69adb444d5ae2 Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Sat, 16 Jun 2018 09:18:38 -0400 Subject: [PATCH 2/2] still fail on non-delayed/deferred tx failure --- libraries/chain/controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index d5429b83ddd..6b5a54c9855 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -805,7 +805,8 @@ struct controller_impl { } bool transaction_failed = trace && trace->except; - if( transaction_failed && receipt.status != transaction_receipt_header::hard_fail ) { + bool transaction_can_fail = receipt.status == transaction_receipt_header::hard_fail && receipt.trx.contains(); + if( transaction_failed && !transaction_can_fail) { edump((*trace)); throw *trace->except; }