Extract should_replace from Scoring and supply pooled txs from same sender#116
Merged
Conversation
tomusdrw
approved these changes
Mar 22, 2019
Contributor
Author
|
Bump to version |
tomusdrw
reviewed
Mar 26, 2019
Contributor
|
Seems like there is still an issue with tests: error[E0053]: method `should_replace` has an incompatible type for trait
--> transaction-pool/src/tests/helpers.rs:77:20
|
77 | fn should_replace(&mut self, old: &ReplaceTransaction<Transaction>, new: &ReplaceTransaction<Transaction>) -> scoring::Choice {
| ^^^^^^^^^ types differ in mutability
|
::: transaction-pool/src/replace.rs:52:23
|
52 | fn should_replace(&self, old: &ReplaceTransaction<T>, new: &ReplaceTransaction<T>) -> Choice;
| ----- type in trait
|
= note: expected type `fn(&tests::helpers::DummyScoring, &replace::ReplaceTransaction<'_, tests::Transaction>, &replace::ReplaceTransaction<'_, tests::Transaction>) -> scoring::Choice`
found type `fn(&mut tests::helpers::DummyScoring, &replace::ReplaceTransaction<'_, tests::Transaction>, &replace::ReplaceTransaction<'_, tests::Transaction>) -> scoring::Choice`
help: consider change the type to match the mutability in trait
|
77 | fn should_replace(&self, old: &ReplaceTransaction<Transaction>, new: &ReplaceTransaction<Transaction>) -> scoring::Choice {
| ^^^^^ |
Contributor
|
Merging since appveyor failures are unrelated and travis only failed the windows build (due to timeout). |
tomusdrw
approved these changes
Mar 28, 2019
sorpaas
approved these changes
Mar 28, 2019
ordian
added a commit
that referenced
this pull request
May 6, 2019
* master: Bump fixed-hash to 0.3.2 (#134) Use EntropyRng instead of OsRng (#130) Bump parity-crypto to 0.3.1 (#132) rust-crypto dependency removal (#85) Use newly stablized TryFrom trait for primitive-types (#127) change dependencies of `keccak-hash`and `trie-standardmap` (#111) bring appveyor back (#118) Extract `should_replace` from Scoring and supply pooled txs from same sender (#116)
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
should_replacedoes not use the computed score, and is actually called only onimport(when pool limits are reached).Further, we pass other pooled transactions from the respective senders of the
oldandnewtransactions which are being compared. This would allow an implementation to also compare theReadinessof the transactions when deciding if thenewshould push out theold.