mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Fix empty candidate txs (#1168)
This commit is contained in:
parent
9e0b3b6862
commit
c412bc6c60
1 changed files with 4 additions and 1 deletions
|
@ -102,7 +102,10 @@ where
|
|||
.filter(|x| x.state == from_state)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let candidate_txs = entries.iter().map(|x| x.tx.clone()).collect();
|
||||
let candidate_txs: Vec<Transaction> = entries.iter().map(|x| x.tx.clone()).collect();
|
||||
if candidate_txs.is_empty() {
|
||||
return Ok(vec![]);
|
||||
}
|
||||
let valid_txs = self.blockchain.validate_raw_txs(candidate_txs, extra_tx)?;
|
||||
|
||||
// Update state on all entries included in final vec of valid txs.
|
||||
|
|
Loading…
Reference in a new issue