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

fix bloom bitvecjournal storage allocation #6390

Merged
merged 1 commit into from
Aug 28, 2017

Conversation

Hawstein
Copy link
Contributor

Since the type of elem is u64, size/64 + extra is sufficient for the storage. Correct me if I am wrong or just miss something. Thank you:)

impl BitVecJournal {
	pub fn new(size: usize) -> BitVecJournal {
		let extra = if size % 8 > 0  { 1 } else { 0 };
		BitVecJournal {
			elems: vec![0u64; size / 8 + extra],
			journal: HashSet::new(),
		}
	}
// ... skip
}

@parity-cla-bot
Copy link

It looks like @Hawstein hasn'signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io

Once you've signed, plesae reply to this thread with [clabot:check] to prove it.

Many thanks,

Parity Technologies CLA Bot

@Hawstein
Copy link
Contributor Author

[clabot:check]

@parity-cla-bot
Copy link

It looks like @Hawstein signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Aug 27, 2017
@tomusdrw tomusdrw requested a review from debris August 27, 2017 11:54
@debris
Copy link
Collaborator

debris commented Aug 27, 2017

I think you are right! Thanks for contribution! 👍

@debris debris added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Aug 27, 2017
@Hawstein
Copy link
Contributor Author

@debris No problem:) So this PR can be merged?

@tomusdrw tomusdrw merged commit 6226326 into openethereum:master Aug 28, 2017
@Hawstein Hawstein deleted the fix-bloom-bitvec branch August 28, 2017 08:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants