forked from TrueCloudLab/neoneo-go
core: adjust verifyTxAttributes
for HighPriority attributes
The fact that they have hight priority does not mean that cheks for other attributes should be skipped.
This commit is contained in:
parent
8cdf2d3464
commit
fc9f0034c9
1 changed files with 2 additions and 5 deletions
|
@ -1328,12 +1328,9 @@ func (bc *Blockchain) verifyTxAttributes(tx *transaction.Transaction) error {
|
|||
switch attrType := tx.Attributes[i].Type; attrType {
|
||||
case transaction.HighPriority:
|
||||
h := bc.contracts.NEO.GetCommitteeAddress()
|
||||
for i := range tx.Signers {
|
||||
if tx.Signers[i].Account.Equals(h) {
|
||||
return nil
|
||||
}
|
||||
if !tx.HasSigner(h) {
|
||||
return fmt.Errorf("%w: high priority tx is not signed by committee", ErrInvalidAttribute)
|
||||
}
|
||||
return fmt.Errorf("%w: high priority tx is not signed by committee", ErrInvalidAttribute)
|
||||
case transaction.OracleResponseT:
|
||||
h, err := bc.contracts.Oracle.GetScriptHash(bc.dao)
|
||||
if err != nil || h.Equals(util.Uint160{}) {
|
||||
|
|
Loading…
Reference in a new issue