Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Add removed field to Log JSON (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
iostat committed Oct 28, 2020
1 parent 685b1d9 commit 1177fe8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Log.prototype.toJSON = function() {
address: to.rpcDataHexString(this.address),
data: to.rpcDataHexString(this.data),
topics: this.topics,
type: "mined"
type: "mined",
removed: (this.removed || false)
};
};

Expand Down
1 change: 1 addition & 0 deletions test/local/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@ const tests = function(web3) {
const receipt = await web3.eth.sendTransaction(txData);
assert.strictEqual(receipt.logs.length, 1, "Receipt had wrong amount of logs");
assert.strictEqual(receipt.logs[0].blockHash, receipt.blockHash, "Logs blockhash doesn't match block blockhash");
assert.strictEqual(typeof receipt.logs[0].removed, "boolean", "Logs removed field missing or not a boolean");

// Now double check the data was set properly.
// NOTE: Because ethereumjs-testrpc processes transactions immediately,
Expand Down

0 comments on commit 1177fe8

Please sign in to comment.