Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Receipt constructor Allocate less stack for blooms #9146

Merged
merged 2 commits into from
Jul 17, 2018

Conversation

niklasad1
Copy link
Collaborator

Address grumbles in #9086

Ping @debris

@niklasad1 niklasad1 added A0-pleasereview 🤓 Pull request needs code review. A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). labels Jul 17, 2018
@niklasad1 niklasad1 assigned debris and unassigned debris Jul 17, 2018
@niklasad1 niklasad1 requested a review from debris July 17, 2018 10:27
@5chdn 5chdn added this to the 2.1 milestone Jul 17, 2018
@debris debris added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 17, 2018
@@ -52,7 +52,10 @@ impl Receipt {
pub fn new(outcome: TransactionOutcome, gas_used: U256, logs: Vec<LogEntry>) -> Self {
Self {
gas_used,
log_bloom: logs.iter().fold(Bloom::default(), |b, l| b | l.bloom()),
log_bloom: logs.iter().fold(Bloom::default(), |mut b, l| {
b.accrue(BloomInput::Raw(&l.bloom()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accrue_bloom, not accrue 🤦‍♂️

Copy link
Contributor

@andresilva andresilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I updated this to use accrue_bloom since we want to combine the bloom filters, instead accrue was adding the given bloom filter as a value.

@niklasad1
Copy link
Collaborator Author

Thanks 👍

@andresilva andresilva merged commit a24e78f into master Jul 17, 2018
@niklasad1 niklasad1 deleted the ethcore-receipt-ctor/marek-grumbles branch July 17, 2018 16:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants