Simplify tx.validate() and transaction::aggregate() (#1436)

* simplify tx validation and aggregation
we *only* need to account for reward when building a block from txs

* rustfmt

* cleanup and tests passing

* rustfmt

* better comments in with_reward()

* fix wallet tests
This commit is contained in:
Antioch Peverell
2018-08-28 20:00:25 +01:00
committed by GitHub
parent 3dacc6a397
commit c334c557aa
10 changed files with 120 additions and 135 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ fn process_stem_phase(tx_pool: Arc<RwLock<TransactionPool>>) -> Result<(), PoolE
stem_txs.len()
);
let agg_tx = transaction::aggregate(stem_txs, None)?;
let agg_tx = transaction::aggregate(stem_txs)?;
let res = tx_pool.adapter.stem_tx_accepted(&agg_tx);
if res.is_err() {
@@ -142,7 +142,7 @@ fn process_fluff_phase(tx_pool: Arc<RwLock<TransactionPool>>) -> Result<(), Pool
stem_txs.len()
);
let agg_tx = transaction::aggregate(stem_txs, None)?;
let agg_tx = transaction::aggregate(stem_txs)?;
let src = TxSource {
debug_name: "fluff".to_string(),