mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
unspentcoinstate: fix branch never executed
This commit is contained in:
parent
05ea84454c
commit
063fe5be9d
1 changed files with 2 additions and 3 deletions
|
@ -122,15 +122,14 @@ func IsDoubleSpend(s storage.Store, tx *transaction.Transaction) bool {
|
|||
if r.Err != nil {
|
||||
return false
|
||||
}
|
||||
if unspent == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
for _, input := range inputs {
|
||||
if int(input.PrevIndex) >= len(unspent.states) || unspent.states[input.PrevIndex] == CoinStateSpent {
|
||||
return true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue