core: simplify GetTransationResults() based on golint suggestion
Golint: pkg/core/blockchain.go:796:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) Refs. #213.
This commit is contained in:
parent
0c160a81fe
commit
89ed00ddfb
1 changed files with 31 additions and 33 deletions
|
@ -791,9 +791,10 @@ func (bc *Blockchain) GetTransationResults(t *transaction.Transaction) []*transa
|
|||
var results []*transaction.Result
|
||||
tempGroupResult := make(map[util.Uint256]util.Fixed8)
|
||||
|
||||
if references := bc.References(t); references == nil {
|
||||
references := bc.References(t)
|
||||
if references == nil {
|
||||
return nil
|
||||
} else {
|
||||
}
|
||||
for _, output := range references {
|
||||
tempResults = append(tempResults, &transaction.Result{
|
||||
AssetID: output.AssetID,
|
||||
|
@ -825,9 +826,6 @@ func (bc *Blockchain) GetTransationResults(t *transaction.Transaction) []*transa
|
|||
}
|
||||
|
||||
return results
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// GetScriptHashesForVerifying returns all the ScriptHashes of a transaction which will be use
|
||||
|
|
Loading…
Reference in a new issue