This repository was archived by the owner on Nov 6, 2020. It is now read-only.
simplify BlockReward::reward implementation#10906
Merged
Merged
Conversation
ordian
approved these changes
Jul 21, 2019
Member
ordian
left a comment
There was a problem hiding this comment.
Tests need to be fixed:
error[E0308]: mismatched types
--> ethcore/src/engines/block_reward.rs:207:40
|
207 | assert!(block_reward_contract.reward(&vec![], &mut call).unwrap().is_empty());
| ^^^^^^^
| |
| expected struct `std::vec::Vec`, found reference
| help: consider removing the borrow: `vec![]`
|
= note: expected type `std::vec::Vec<(ethereum_types::H160, engines::block_reward::RewardKind)>`
found type `&std::vec::Vec<_>`
error[E0308]: mismatched types
--> ethcore/src/engines/block_reward.rs:216:46
|
216 | let rewards = block_reward_contract.reward(&beneficiaries, &mut call).unwrap();
| ^^^^^^^^^^^^^^
| |
| expected struct `std::vec::Vec`, found reference
| help: consider removing the borrow: `beneficiaries`
|
= note: expected type `std::vec::Vec<(ethereum_types::H160, engines::block_reward::RewardKind)>`
found type `&std::vec::Vec<(ethereum_types::H160, engines::block_reward::RewardKind)>`
error: aborting due to 2 previous errors
niklasad1
approved these changes
Jul 24, 2019
Collaborator
niklasad1
left a comment
There was a problem hiding this comment.
LGTM, but the tests need to be fixed as Andronik already said
ordian
added a commit
that referenced
this pull request
Aug 7, 2019
* master: journaldb changes (#10929) Allow default block parameter to be blockHash (#10932) Enable sealing when engine is ready (#10938) Fix some warnings and typos. (#10941) Updated security@parity.io key (#10939) Change the return type of step_inner function. (#10940) get rid of hidden mutability of Spec (#10904) simplify BlockReward::reward implementation (#10906) Kaspersky AV whitelisting (#10919) additional arithmetic EVM opcode benchmarks (#10916) [Cargo.lock] cargo update -p crossbeam-epoch (#10921) Fixes incorrect comment. (#10913) Add file path to disk map write/read warnings (#10911)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
reduce number of expects