Skip to content

Commit

Permalink
Fix for blocks containing hard failed transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
shaqk committed Jan 25, 2024
1 parent f60a8ca commit 8496cd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ibcFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function getShipReceiptDigests(block_to_prove, action_receipt_digest){
var transactions = block_to_prove.transactions;
for (traces of transactions){
for (trace of traces.action_traces.sort((a,b)=> a.receipt.global_sequence > b.receipt.global_sequence? 1 :-1)){
if (!trace || !trace.receipt) continue;
var receipt_digest = getReceiptDigest(trace.receipt);
//if this is the trace of the action we are trying to prove, assign the action_return_value from trace result
if (receipt_digest === action_receipt_digest && trace.return_value) action_return_value = trace.return_value.toString()
Expand Down Expand Up @@ -85,6 +86,7 @@ function getFirehoseReceiptDigests(block_to_prove, action_receipt_digest){

for (traces of transactions){
for (trace of traces){
if (!trace || !trace.receipt) continue;
trace.action.rawData = hex64.toHex(trace.action.rawData);
var receipt_digest = getReceiptDigest(trace.receipt);
//if this is the trace of the action we are trying to prove, assign the action_return_value from trace result
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ibc-proof-server",
"version": "2.2.3",
"version": "2.2.4",
"description": "IBC Proof Server generates and serves heavy and light proofs for actions and schedules.",
"bin": "index.js",
"main": "index.js",
Expand Down

0 comments on commit 8496cd4

Please sign in to comment.