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:
parent
21e0cd7781
commit
a24e78fa92
@ -52,7 +52,10 @@ impl Receipt {
|
|||||||
pub fn new(outcome: TransactionOutcome, gas_used: U256, logs: Vec<LogEntry>) -> Self {
|
pub fn new(outcome: TransactionOutcome, gas_used: U256, logs: Vec<LogEntry>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
gas_used,
|
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,
|
logs,
|
||||||
outcome,
|
outcome,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user