mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Pass transaction source to validate_transaction (#5366)
* WiP * Support source in the runtime API. * Finish implementation in txpool. * Fix warning. * Fix tests. * Apply suggestions from code review Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-Authored-By: Nikolay Volf <nikvolf@gmail.com> * Extra changes. * Fix test and benches. * fix test * Fix test & benches again. * Fix tests. * Update bumpalo * Fix doc test. * Fix doctest. * Fix doctest. Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
@@ -239,6 +239,7 @@ mod tests {
|
||||
BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone()))).0
|
||||
);
|
||||
|
||||
let source = sp_runtime::transaction_validity::TransactionSource::External;
|
||||
let new_transaction = |nonce: u64| {
|
||||
let t = Transfer {
|
||||
from: AccountKeyring::Alice.into(),
|
||||
@@ -250,9 +251,9 @@ mod tests {
|
||||
};
|
||||
// Populate the pool
|
||||
let ext0 = new_transaction(0);
|
||||
block_on(pool.submit_one(&BlockId::number(0), ext0)).unwrap();
|
||||
block_on(pool.submit_one(&BlockId::number(0), source, ext0)).unwrap();
|
||||
let ext1 = new_transaction(1);
|
||||
block_on(pool.submit_one(&BlockId::number(0), ext1)).unwrap();
|
||||
block_on(pool.submit_one(&BlockId::number(0), source, ext1)).unwrap();
|
||||
|
||||
let accounts = FullSystem::new(client, pool);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user