Pool tx weight verification (#2466)
This commit is contained in:
committed by
Ignotus Peverell
parent
a97ab376cb
commit
c8fd0575ed
@@ -15,7 +15,7 @@
|
||||
pub mod common;
|
||||
|
||||
use self::core::core::verifier_cache::LruVerifierCache;
|
||||
use self::core::core::{transaction, Block, BlockHeader};
|
||||
use self::core::core::{transaction, Block, BlockHeader, Weighting};
|
||||
use self::core::libtx;
|
||||
use self::core::pow::Difficulty;
|
||||
use self::keychain::{ExtKeychain, Keychain};
|
||||
@@ -177,7 +177,7 @@ fn test_the_transaction_pool() {
|
||||
let mut write_pool = pool.write();
|
||||
let agg_tx = write_pool
|
||||
.stempool
|
||||
.aggregate_transaction()
|
||||
.all_transactions_aggregate()
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(agg_tx.kernels().len(), 2);
|
||||
@@ -219,7 +219,9 @@ fn test_the_transaction_pool() {
|
||||
// tx4 is the "new" part of this aggregated tx that we care about
|
||||
let agg_tx = transaction::aggregate(vec![tx1.clone(), tx2.clone(), tx4]).unwrap();
|
||||
|
||||
agg_tx.validate(verifier_cache.clone()).unwrap();
|
||||
agg_tx
|
||||
.validate(Weighting::AsTransaction, verifier_cache.clone())
|
||||
.unwrap();
|
||||
|
||||
write_pool
|
||||
.add_to_pool(test_source(), agg_tx, false, &header)
|
||||
|
||||
Reference in New Issue
Block a user