Receipt constructor `Allocate less stack for blooms` (#9146)

* Allocate less stack in `Receipt ctor`

* ethcore: use accrue_bloom when computing transaction receipt
This commit is contained in:
Niklas Adolfsson 2018-07-17 17:55:46 +02:00 committed by André Silva
parent 21e0cd7781
commit a24e78fa92
1 changed files with 4 additions and 1 deletions

View File

@ -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_bloom(&l.bloom());
b
}),
logs,
outcome,
}