Skip to content

Commit

Permalink
status field in transaction receipt (EIP658) (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgmichel authored Nov 27, 2020
1 parent d438171 commit a504a6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions client/rpc/src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,9 +884,9 @@ impl<B, C, P, CT, BE, H: ExHashT> EthApiT for EthApi<B, C, P, CT, BE, H> where
}
}).collect()
},
state_root: Some(receipt.state_root),
status_code: Some(U64::from(receipt.state_root.to_low_u64_be())),
logs_bloom: receipt.logs_bloom,
status_code: None,
state_root: None,
}))
}
_ => Ok(None),
Expand Down
8 changes: 4 additions & 4 deletions ts-tests/tests/test-revert-receipt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ describeWithFrontier("Frontier RPC (Constructor Revert)", `simple-specs.json`, (
});

// Verify the receipt exists after the block is created
//TODO Actually, why doesn't this receipt have a status in it?
// I guess because the RPC handler in eth.rs sets `status_code: None`??
await createAndFinalizeBlock(context.web3);
const receipt = await context.web3.eth.getTransactionReceipt(GOOD_TX_HASH);
expect(receipt).to.include({
Expand All @@ -55,7 +53,8 @@ describeWithFrontier("Frontier RPC (Constructor Revert)", `simple-specs.json`, (
gasUsed: 67231,
to: null,
transactionHash: '0xae813c533aac0719fbca4db6e3bb05cfb5859bdeaaa7dc5c9dbd24083301be8d',
transactionIndex: 0
transactionIndex: 0,
status: true
});
});

Expand Down Expand Up @@ -94,7 +93,8 @@ describeWithFrontier("Frontier RPC (Constructor Revert)", `simple-specs.json`, (
gasUsed: 54600,
to: null,
transactionHash: '0x640df9deb183d565addc45bdc8f95b30c7c03ce7e69df49456be9929352e4347',
transactionIndex: 0
transactionIndex: 0,
status: false
});
});
});

0 comments on commit a504a6a

Please sign in to comment.