Skip to content

Commit 9a085dc

Browse files
feat: uncomment appeal button (#938)
* feat: uncomment appeal button * refactor: show only readable input calldata in transaction detail * fix issue leader result is empty on appeal execution * fix: consensus test timing failure --------- Co-authored-by: Cristiam Da Silva <cristiam86@gmail.com>
1 parent 7cc7531 commit 9a085dc

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

backend/consensus/base.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,11 @@ async def handle(self, context):
16581658
context.node_factory(
16591659
validator,
16601660
ExecutionMode.VALIDATOR,
1661-
context.contract_snapshot_supplier(),
1661+
(
1662+
context.transaction.contract_snapshot
1663+
if context.transaction.contract_snapshot
1664+
else context.contract_snapshot_supplier()
1665+
),
16621666
context.consensus_data.leader_receipt,
16631667
context.msg_handler,
16641668
context.contract_snapshot_factory,

frontend/src/components/Simulator/TransactionItem.vue

+9-3
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function prettifyTxData(x: any): any {
171171
"
172172
/>
173173

174-
<!-- <div @click.stop="">
174+
<div @click.stop="">
175175
<Btn
176176
v-if="
177177
transaction.data.leader_only == false &&
@@ -193,7 +193,7 @@ function prettifyTxData(x: any): any {
193193
<GavelIcon class="h-2.5 w-2.5" />
194194
</div>
195195
</Btn>
196-
</div> -->
196+
</div>
197197

198198
<TransactionStatusBadge
199199
:class="[
@@ -263,8 +263,14 @@ function prettifyTxData(x: any): any {
263263
<template #title>Input</template>
264264

265265
<pre
266+
v-if="transaction.data.data.calldata.readable"
267+
class="overflow-hidden rounded bg-gray-200 p-1 text-xs text-gray-600 dark:bg-zinc-800 dark:text-gray-300"
268+
>{{ transaction.data.data.calldata.readable }}</pre
269+
>
270+
<pre
271+
v-if="!transaction.data.data.calldata.readable"
266272
class="overflow-hidden rounded bg-gray-200 p-1 text-xs text-gray-600 dark:bg-zinc-800 dark:text-gray-300"
267-
>{{ transaction.data.data }}</pre
273+
>{{ transaction.data.data.calldata.base64 }}</pre
268274
>
269275
</ModalSection>
270276

tests/unit/consensus/test_helpers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ def set_transaction_appeal(self, transaction_hash: str, appeal: bool):
8282
TransactionStatus.ACCEPTED.value,
8383
TransactionStatus.UNDETERMINED.value,
8484
):
85-
transaction["appealed"] = appeal
8685
self.set_transaction_timestamp_appeal(transaction, int(time.time()))
86+
time.sleep(1)
87+
transaction["appealed"] = appeal
8788

8889
def set_transaction_timestamp_awaiting_finalization(
8990
self, transaction_hash: str, timestamp_awaiting_finalization: int = None

0 commit comments

Comments
 (0)