forked from TrueCloudLab/neoneo-go
core: short-circuit verifyInputs when there are no inputs
This commit is contained in:
parent
70b3839fd0
commit
f9963cca37
1 changed files with 3 additions and 0 deletions
|
@ -306,6 +306,9 @@ func (mp *Pool) GetVerifiedTransactions() []*transaction.Transaction {
|
||||||
|
|
||||||
// verifyInputs is an internal unprotected version of Verify.
|
// verifyInputs is an internal unprotected version of Verify.
|
||||||
func (mp *Pool) verifyInputs(tx *transaction.Transaction) bool {
|
func (mp *Pool) verifyInputs(tx *transaction.Transaction) bool {
|
||||||
|
if len(tx.Inputs) == 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
for _, item := range mp.unsortedTxn {
|
for _, item := range mp.unsortedTxn {
|
||||||
for i := range item.txn.Inputs {
|
for i := range item.txn.Inputs {
|
||||||
for j := 0; j < len(tx.Inputs); j++ {
|
for j := 0; j < len(tx.Inputs); j++ {
|
||||||
|
|
Loading…
Reference in a new issue